Convention over Configuration Proxy written in Node.js.
MIT License
Convention over Configuration Proxy written in Node.js.
If you access http://localhost:8087/http://example.com/script.js
, then the proxy get following:
<Current Directory>/example.com/script.js
<Current Directory>/example.com/script.js
http://example.com/script.js
npm install -g cocproxy
$ cocproxy [options]
Options:
-h, --help Show help.
-v, --version Outputs the version number.
-d, --mock-file-dir path::String Set mock file from this directory
-p, --port Number Set port number to thi proxy
$ cocproxy -p 8098
<WORKING_ROOT>/example.com/example.css
, then return this local file.cocproxy.js
var CocProxy = require("cocproxy").CocProxy;
var options = {
port : 8087,
mockFileDir : "./"
}
var cocProxy = new CocProxy(options);
cocProxy.start();
// proxing
cocProxy.exit();
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT