{"name":"foxy","version":"11.1.5","description":"Proxy with response modding","main":"index.js","scripts":{"lint":"jshint *.js lib/*.js test/specs/*.js test/specs/*/*.js","unit":"mocha --recursive test/specs","cover":"npm run lint && istanbul cover _mocha --report lcovonly -- --timeout 10000 --recursive test/specs && istanbul-coveralls","test":"npm run lint && npm run unit"},"repository":{"type":"git","url":"git+https://github.com/shakyshane/foxy.git"},"files":["lib","index.js","cli.js","help.txt"],"keywords":["proxy"],"bin":{"foxy":"cli.js"},"author":{"name":"Shane Osbourne"},"license":"MIT","dependencies":{"connect":"^3.3.5","dev-ip":"^1.0.1","eazy-logger":"^2.0.0","http-proxy":"^1.9.0","lodash.merge":"^3.3.1","meow":"^3.1.0","resp-modifier":"^4.0.2"},"devDependencies":{"cookie":"^0.1.3","browser-sync":"^2.3.1","chai":"^2.1.2","connect-gzip":"^0.1.6","istanbul":"^0.3.8","istanbul-coveralls":"^1.0.2","jshint":"^2.6.3","lodash":"^3.5.0","mocha":"^2.2.1","multiline":"^1.0.2","portscanner-plus":"^0.2.1","sinon":"^1.14.1","socket.io":"^1.3.5","socket.io-client":"^1.3.5","supertest":"^0.15.0"},"gitHead":"ae4d9dbe051c977c2ede130498fcb0c54638e95a","bugs":{"url":"https://github.com/shakyshane/foxy/issues"},"homepage":"https://github.com/shakyshane/foxy#readme","_id":"foxy@11.1.5","_shasum":"b7e07d8cea9287f029298007083f4987c8aab458","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.4","_npmUser":{"name":"shakyshane","email":"shakyshane@gmail.com"},"dist":{"shasum":"b7e07d8cea9287f029298007083f4987c8aab458","tarball":"http://registry-npm.ywwl.com/foxy/download/foxy-11.1.5.tgz","integrity":"sha512-rcNKboFfzfT+U+a0TIrPX4qXu3PLdoae7Bx3RQT1UzoGlp846p0xxnXX8FEgv07t0iVPTOinN2SkcCQaELR6mg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGaKtSWMoAL8xSO/sYyfsHdNqraslj2mSHSnZMWjvPVHAiEAyB9m5SRA1F4YZaYFkR6FkmR1mrR3WQRVGHQWvWiw+8I="}],"size":6507,"noattachment":false,"key":"/foxy/-/foxy-11.1.5.tgz"},"maintainers":[{"name":"shakyshane","email":"shakyshane@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/foxy-11.1.5.tgz_1458677999539_0.2004121784120798"},"directories":{},"readme":"##Foxy \n[![Travis branch](https://img.shields.io/travis/shakyShane/foxy/master.svg?style=flat-square&label=linux)](https://travis-ci.org/shakyShane/foxy)\n[![AppVeyor branch](https://img.shields.io/appveyor/ci/shakyshane/foxy/master.svg?style=flat-square&label=windows)]()\n\nProxy with response moddin'\n\n##cli\nFirst, install globally\n```bash\n$ npm install -g foxy\n```\n\nThen, if you wanted to proxy a local vhost such as `http://magento.dev` run:\n```bash\n$ foxy http://magento.dev\n```\n\nA random port will be used, but if you want to provide your own:\n```bash\n$ foxy http://magento.dev --port 3000\n```\n\n##api\n```js\nvar foxy = require(\"foxy\");\n\nvar proxy = foxy(\"http://localhost:3000\").listen(8000);\n\n// Now access the site through http://localhost:8000\n```\n\nBuilt-in middleware will re-write html on the fly to update any urls & there'll also be the option\nfor additional rules for the re-writing.\n\n## Additional re-write rules\n\nLet's say you want to change the text `Home Page` to be `Homepage Rocks`, you can do that easily by \nproviding additional `rules`\n\n```js\nvar foxy = require(\"foxy\");\n\nvar config = {\n    rules: [\n        {\n            match: /Home Page/g,\n            fn: function () {\n                return \"Homepage Rocks\"\n            }\n        }\n    ]\n};\n\nvar proxy = foxy(\"http://localhost:3000\", config).listen(8000);\n```\n\n## white/black lists\n\nYou can force some paths to always be processed by the middlewares.\n\n```js\nvar proxy = foxy(\"http://wordpress.dev\", {\n    whitelist: [\"/wp-admin/admin-ajax.php\"], // whitelist checked first\n    blacklist: [\"/wp-admin/**\"],\n}).listen(8000);\n```\n\n## proxyResponse middleware\n\nYou can add middleware-like functions which process the proxy response.\n\n```js\nvar foxy = require(\"foxy\");\n\nvar config = {\n    proxyRes: [\n        function(proxyRes, req, config) {\n            // do something with the proxyRes object which comes from node-http-proxy\n        }\n    ]\n};\n\nvar proxy = foxy(\"http://localhost:3000\", config).listen(8000);\n```\n\n#TODO\n\n- [ ] https\n\n\n","publish_time":1458678002077,"_cnpm_publish_time":1458678002077,"dist-tags":{"latest":"11.1.5"}}