{"_id":"@abcnews/mostess","_rev":"12-41bc640c5ee8249eb2e04507cece8577","name":"@abcnews/mostess","description":"Proxy to serve local assets.","dist-tags":{"latest":"2.0.1"},"versions":{"2.0.0":{"name":"@abcnews/mostess","version":"2.0.0","description":"Proxy to serve local assets.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Ash Kyd","email":"kyd.ashley@abc.net.au"},"license":"ISC","dependencies":{"commander":"^2.8.0","express":"^4.12.3","mime-types":"^2.0.10","request":"^2.55.0"},"devDependencies":{"eslint":"^3.19.0","eslint-config-airbnb":"^15.1.0","eslint-plugin-import":"^2.8.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.5.1"},"gitHead":"f6a165d6a1776a166c5be9d916cfc9cf8c889c20","_id":"@abcnews/mostess@2.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"ashkyd","email":"ash@kyd.com.au"},"dist":{"integrity":"sha512-v3iDcWGc+H6QxMTG53XutwOZk3Ioc0X7D1IL6YbSsc4toZclcQPiLpfEnkz+5VgY3OpW2gTmZHkPwhNRs1kS9A==","shasum":"3b67158dcb013d485b63991bd8d51ad4ea9b9cd9","tarball":"https://registry.npmjs.org/@abcnews/mostess/-/mostess-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCD155xDnw+LQh3x+pP1IlJSEflCkM039wXtle+sfpWTAIgBxZe31PFoQuquHWHT6IIHQSxVrX5VTKmntAY2qlMYTQ="}]},"maintainers":[{"name":"ashkyd","email":"ash@kyd.com.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mostess-2.0.0.tgz_1511928169344_0.6143366678152233"},"directories":{}},"2.0.1":{"name":"@abcnews/mostess","version":"2.0.1","description":"Proxy to serve local assets.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Ash Kyd","email":"kyd.ashley@abc.net.au"},"license":"ISC","dependencies":{"commander":"^2.8.0","express":"^4.12.3","mime-types":"^2.0.10","request":"^2.55.0"},"devDependencies":{"eslint":"^3.19.0","eslint-config-airbnb":"^15.1.0","eslint-plugin-import":"^2.8.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.5.1"},"gitHead":"cb1ce08d527a7c3fd08e6670845e7a1ace4ed481","_id":"@abcnews/mostess@2.0.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"ashkyd","email":"ash@kyd.com.au"},"dist":{"integrity":"sha512-BLropnkbdCUVxxcVilB+PgwlTiPhOLyb8fTNDNgkZ+g5DBZhCLzO4Xu9HFP8neJhhp5lTfb866v94bkiXPZq6A==","shasum":"80dde038dd80fd772a7412827e69958c69f55852","tarball":"https://registry.npmjs.org/@abcnews/mostess/-/mostess-2.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBaVyR0VTaqfwEHXHsw/okLl7BdRRHdpGnSYs2TXf4zUAiBlK4AGTO9MHZ0R2cHOkdAKawvHnqHs59Ahqsq/9R/lnQ=="}]},"maintainers":[{"name":"nathanhoad","email":"nathan@nathanhoad.net"},{"name":"louisstow","email":"louisstow@gmail.com"},{"name":"blakebutcher","email":"blake.butcher@abc.net.au"},{"name":"joshduck","email":"npm@joshduck.com"},{"name":"colingourlay","email":"colin@colin-gourlay.com"},{"name":"drzax","email":"simon@elvery.net"},{"name":"ashkyd","email":"ash@kyd.com.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mostess-2.0.1.tgz_1512714910336_0.5781322424300015"},"directories":{}}},"readme":"Mostess\n=======\nThe hostess.\n\nA quick 'n dirty HTTP server that serves up a configurable mix of dev &\nproduction resources. Use this to swap in local resources while browsing a\nproduction site, or redirect resources to a local dev server.\n\nUsage\n-----\nThis runs on port 80 and thus needs to be run as root. To set up:\n\n1. `sudo node ./index.js -c <config.js>`\n2. Change your `/etc/hosts` file to point the remote server to localhost\n\nThe hosts file should look as follows:\n\n```\n0.0.0.0\twww.example.org\n```\nThe server will continue to run until you kill it manually.\n\nConfig\n------\nConfig is managed as a Javascript module. The following values are supported:\n\n* paths: An array containing local paths to search in. A local path is an array with two\n  values: the requested path as a regex, and the local path it maps to. Eg. `[\"/\", \"/home/me/www/\"]`\n* searchandreplace: An object containing values to search and replace in the url. Eg. `{\"v1.0.0\": \"v1.0.1\"}`\n* ssl: An optional object containing the following:\n** key: a path to a SSL key\n** cert: a path to the SSL cert.\n** passphrase: a string to unlock the private key (optional);\n\nAn example config follows:\n\n``` js\nmodule.exports = {\n  searchandreplace: [\n    // Point the remote foo to the local bar\n    ['foo.js', 'bar.js'],\n  ],\n  redirect: [\n    // Redirect assets to another server\n    // foo.css or bar.css will be redirected to the server on localhost:8000\n    [ /.*((foo|bar).css)$/, 'http://localhost:8000/$1' ],\n  ],\n  paths: [\n    // Redirect this path to the local build folder\n    [\n      /^\\/remote\\/path\\/v1.0.0/,\n      'build/',\n    ],\n    // Use regexes to redirect multiple remotes to the local path\n    [\n      /^\\/remote\\/path\\/[^/]+/,\n      'build/',\n    ],\n  ],\n  ssl: {\n      key: \"path/to/key\",\n      cert: \"path/to/cert\",\n      passphrase: \"my passphrase (optional)\"\n  }\n};\n\n```\n\nSSL\n------\n\nSSL is useful if you're testing a site that uses SSL. SSL on port 443 is enabled\nthrough the SSL options on the command line, or by specifying SSL options in the\nconfig file.\n\nEg.\n\n````\nnode index.js --key='serv.key' --cert='server.cert'\n````\n\nTo generate your own SSL certificate:\n\n````\nopenssl req  -nodes -new -x509  -keyout server.key -out server.cert\n````\n\nSome warnings\n-------------\nThis is a development server. It is not intended to be run on the open Internet\nor without a firewall in place. Take appropriate precautions.\n","maintainers":[{"email":"ash@kyd.com.au","name":"ashkyd"},{"email":"hi@jtfell.com","name":"jtfell"},{"email":"phocks@gmail.com","name":"phocks"},{"email":"andy@andrewkesper.com","name":"andrewkesper"},{"email":"simon@elvery.net","name":"drzax"}],"time":{"modified":"2023-08-10T04:59:31.571Z","created":"2017-11-29T04:02:49.806Z","2.0.0":"2017-11-29T04:02:49.806Z","2.0.1":"2017-12-08T06:35:10.557Z"},"author":{"name":"Ash Kyd","email":"kyd.ashley@abc.net.au"},"license":"ISC","readmeFilename":"README.md"}