{"_id":"http-serve","_rev":"2935429","name":"http-serve","description":"Command-line http server with gzipping and fallback support","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"hojyman","email":"altmine@gmail.com"}],"time":{"modified":"2023-04-13T05:58:12.000Z","created":"2017-02-07T14:36:56.227Z","1.0.1":"2017-02-07T14:57:51.958Z","1.0.0":"2017-02-07T14:43:00.719Z","0.9.1":"2017-02-07T14:39:57.096Z","0.9.0":"2017-02-07T14:36:56.227Z"},"users":{},"repository":{"type":"git","url":"git://github.com/dkarmalita/http-serve.git"},"versions":{"1.0.1":{"name":"http-serve","version":"1.0.1","description":"Command-line http server with gzipping and fallback support","main":"./lib/http-serve","repository":{"type":"git","url":"git://github.com/dkarmalita/http-serve.git"},"keywords":["cli","command","http","https","gzip","gz","fallback"],"scripts":{"start":"node ./bin/http-serve","pretest":"common bin/http-serve lib/ test","test":"vows --spec --isolate"},"contributors":[{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},{"name":"Marak Squires","email":"marak.squires@gmail.com"},{"name":"Charlie McConnell","email":"charlie@charlieistheman.com"},{"name":"Joshua Holbrook","email":"josh.holbrook@gmail.com"},{"name":"Maciej Małecki","email":"maciej.malecki@notimplemented.org"},{"name":"Matthew Bergman","email":"mzbphoto@gmail.com"},{"name":"brad dunbar","email":"dunbarb2@gmail.com"},{"name":"Dominic Tarr"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Jinkwon Lee","email":"master@bdyne.net"},{"name":"Karmalita Dmytro","email":"dmitriy.karmalita@gmail.com"}],"dependencies":{"colors":"1.0.3","corser":"~2.0.0","ecstatic":"^2.0.0","http-proxy":"^1.8.1","opener":"~1.4.0","optimist":"0.6.x","portfinder":"0.4.x","union":"~0.4.3"},"devDependencies":{"common-style":"^3.0.0","request":"2.49.x","vows":"0.7.x"},"license":"MIT","preferGlobal":"true","bin":{"http-serve":"./bin/http-serve","hs":"./bin/http-serve"},"gitHead":"3b7a53644b1317fbffe91e16a83c4eb5f0b635a1","bugs":{"url":"https://github.com/dkarmalita/http-serve/issues"},"homepage":"https://github.com/dkarmalita/http-serve#readme","_id":"http-serve@1.0.1","_shasum":"bb824bf8fed2092e9195837b0bf7b3b6fa3ca2f8","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"hojyman","email":"altmine@gmail.com"},"dist":{"shasum":"bb824bf8fed2092e9195837b0bf7b3b6fa3ca2f8","size":472106,"noattachment":false,"key":"/http-serve/-/http-serve-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/http-serve/download/http-serve-1.0.1.tgz"},"maintainers":[{"name":"hojyman","email":"altmine@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/http-serve-1.0.1.tgz_1486479471299_0.9985887131188065"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T02:38:14.552Z","publish_time":1486479471958,"_cnpm_publish_time":1486479471958},"1.0.0":{"name":"http-serve","version":"1.0.0","description":"Command-line http server with gzipping and fallback support","main":"./lib/http-serve","repository":{"type":"git","url":"git://github.com/dkarmalita/http-serve.git"},"keywords":["cli","command","http","https","gzip","gz","fallback"],"scripts":{"start":"node ./bin/http-serve","pretest":"common bin/http-server lib/ test","test":"vows --spec --isolate"},"contributors":[{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},{"name":"Marak Squires","email":"marak.squires@gmail.com"},{"name":"Charlie McConnell","email":"charlie@charlieistheman.com"},{"name":"Joshua Holbrook","email":"josh.holbrook@gmail.com"},{"name":"Maciej Małecki","email":"maciej.malecki@notimplemented.org"},{"name":"Matthew Bergman","email":"mzbphoto@gmail.com"},{"name":"brad dunbar","email":"dunbarb2@gmail.com"},{"name":"Dominic Tarr"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Jinkwon Lee","email":"master@bdyne.net"},{"name":"Karmalita Dmytro","email":"dmitriy.karmalita@gmail.com"}],"dependencies":{"colors":"1.0.3","corser":"~2.0.0","ecstatic":"^2.0.0","http-proxy":"^1.8.1","opener":"~1.4.0","optimist":"0.6.x","portfinder":"0.4.x","union":"~0.4.3"},"devDependencies":{"common-style":"^3.0.0","request":"2.49.x","vows":"0.7.x"},"license":"MIT","preferGlobal":"true","bin":{"http-server":"./bin/http-serve","hs":"./bin/http-serve"},"gitHead":"3b7a53644b1317fbffe91e16a83c4eb5f0b635a1","bugs":{"url":"https://github.com/dkarmalita/http-serve/issues"},"homepage":"https://github.com/dkarmalita/http-serve#readme","_id":"http-serve@1.0.0","_shasum":"d4fa0f7604b88b46d997edec10559651ed8968c0","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"hojyman","email":"altmine@gmail.com"},"dist":{"shasum":"d4fa0f7604b88b46d997edec10559651ed8968c0","size":472109,"noattachment":false,"key":"/http-serve/-/http-serve-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/http-serve/download/http-serve-1.0.0.tgz"},"maintainers":[{"name":"hojyman","email":"altmine@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/http-serve-1.0.0.tgz_1486478580029_0.7311671224888414"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T02:38:14.435Z","publish_time":1486478580719,"_cnpm_publish_time":1486478580719},"0.9.1":{"name":"http-serve","version":"0.9.1","description":"Command-line http server with gzipping and fallback support","main":"./lib/http-serve","repository":{"type":"git","url":"git://github.com/dkarmalita/http-serve.git"},"keywords":["cli","command","http","https","gzip","gz","fallback"],"scripts":{"start":"node ./bin/http-serve","pretest":"common bin/http-server lib/ test","test":"vows --spec --isolate"},"contributors":[{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},{"name":"Marak Squires","email":"marak.squires@gmail.com"},{"name":"Charlie McConnell","email":"charlie@charlieistheman.com"},{"name":"Joshua Holbrook","email":"josh.holbrook@gmail.com"},{"name":"Maciej Małecki","email":"maciej.malecki@notimplemented.org"},{"name":"Matthew Bergman","email":"mzbphoto@gmail.com"},{"name":"brad dunbar","email":"dunbarb2@gmail.com"},{"name":"Dominic Tarr"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Jinkwon Lee","email":"master@bdyne.net"},{"name":"Karmalita Dmytro","email":"dmitriy.karmalita@gmail.com"}],"dependencies":{"colors":"1.0.3","corser":"~2.0.0","ecstatic":"^2.0.0","http-proxy":"^1.8.1","opener":"~1.4.0","optimist":"0.6.x","portfinder":"0.4.x","union":"~0.4.3"},"devDependencies":{"common-style":"^3.0.0","request":"2.49.x","vows":"0.7.x"},"license":"MIT","preferGlobal":"true","bin":{"http-server":"./bin/http-serve","hs":"./bin/http-serve"},"gitHead":"5bfb797f1baab93b2aa136e57644a33d4ebafc5e","bugs":{"url":"https://github.com/dkarmalita/http-serve/issues"},"homepage":"https://github.com/dkarmalita/http-serve#readme","_id":"http-serve@0.9.1","_shasum":"81961344e4a57701fef1682aee582b4c20767165","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"hojyman","email":"altmine@gmail.com"},"dist":{"shasum":"81961344e4a57701fef1682aee582b4c20767165","size":472132,"noattachment":false,"key":"/http-serve/-/http-serve-0.9.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/http-serve/download/http-serve-0.9.1.tgz"},"maintainers":[{"name":"hojyman","email":"altmine@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/http-serve-0.9.1.tgz_1486478396443_0.5483752486761659"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T02:38:12.779Z","publish_time":1486478397096,"_cnpm_publish_time":1486478397096},"0.9.0":{"name":"http-serve","version":"0.9.0","description":"Command-line http server with gzipping and fallback support","main":"./lib/http-serve","repository":{"type":"git","url":"git://github.com/dkarmalita/http-serve.git"},"keywords":["cli","command","http","https","gzip","gz","fallback"],"scripts":{"start":"node ./bin/http-serve","pretest":"common bin/http-server lib/ test","test":"vows --spec --isolate"},"contributors":[{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},{"name":"Marak Squires","email":"marak.squires@gmail.com"},{"name":"Charlie McConnell","email":"charlie@charlieistheman.com"},{"name":"Joshua Holbrook","email":"josh.holbrook@gmail.com"},{"name":"Maciej Małecki","email":"maciej.malecki@notimplemented.org"},{"name":"Matthew Bergman","email":"mzbphoto@gmail.com"},{"name":"brad dunbar","email":"dunbarb2@gmail.com"},{"name":"Dominic Tarr"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Jinkwon Lee","email":"master@bdyne.net"},{"name":"Karmalita Dmytro","email":"dmitriy.karmalita@gmail.com"}],"dependencies":{"colors":"1.0.3","corser":"~2.0.0","ecstatic":"^2.0.0","http-proxy":"^1.8.1","opener":"~1.4.0","optimist":"0.6.x","portfinder":"0.4.x","union":"~0.4.3"},"devDependencies":{"common-style":"^3.0.0","request":"2.49.x","vows":"0.7.x"},"license":"MIT","preferGlobal":"true","bin":{"http-server":"./bin/http-serve","hs":"./bin/http-serve"},"gitHead":"f860333e53e8a158f4fd7b1bd5eb12c3fa1d8838","bugs":{"url":"https://github.com/dkarmalita/http-serve/issues"},"homepage":"https://github.com/dkarmalita/http-serve#readme","_id":"http-serve@0.9.0","_shasum":"13f3bea353f56beb2781dc538d6436160c5ce9a2","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"hojyman","email":"altmine@gmail.com"},"dist":{"shasum":"13f3bea353f56beb2781dc538d6436160c5ce9a2","size":472116,"noattachment":false,"key":"/http-serve/-/http-serve-0.9.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/http-serve/download/http-serve-0.9.0.tgz"},"maintainers":[{"name":"hojyman","email":"altmine@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/http-serve-0.9.0.tgz_1486478214086_0.1529087710659951"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T02:38:11.117Z","publish_time":1486478216227,"_cnpm_publish_time":1486478216227}},"readme":"# http-serve: a command-line http server\n\nThis is an extended version of [http-server](https://www.npmjs.com/package/http-server) strengthened with a support of gzip compression and a fallback option for nonexistent routes (please see 'Available Options' section bellow for details). Together with `https` support, it make the server ideal for front-end testing purposes.\n\n---\n\n`http-serve` itself is a simple, zero-configuration command-line http server.  It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development, and learning.\n\n![](https://github.com/dkarmalita/http-serve/raw/master/screenshots/public.png)\n\n\n# Installing\n\nInstallation globally via `npm`:\n\n     npm i -g http-serve\n\nThis will install `http-serve` globally so that it may be run from the command line.\n\nOr it can be installed locally, for a project:\n\n     npm i -D http-serve\n\n\n## Usage:\n\n     http-serve [path] [options]\n\n`[path]` defaults to `./public` if the folder exists, and `./` otherwise.\n\n\n## Usage\n\n### Starting http-serve locally\n\n     node bin/http-serve\n\n*Now you can visit http://localhost:8080 to view your server*\n\n## Available Options:\n\n`-p` Port to use (defaults to 8080)\n\n`-a` Address to use (defaults to 0.0.0.0)\n\n`-d` Show directory listings (defaults to 'True')\n\n`-i` Display autoIndex (defaults to 'True')\n\n`-g` or `--gzip` When enabled (defaults to 'False') it will serve `./public/some-file.js.gz` in place of `./public/some-file.js` when a gzipped version of the file exists and the request accepts gzip encoding.\n\n`-e` or `--ext` Default file extension if none supplied (defaults to 'html')\n\n`-s` or `--silent` Suppress log messages from output\n\n`--cors` Enable CORS via the `Access-Control-Allow-Origin` header\n\n`-o` Open browser window after starting the server\n\n`-c` Set cache time (in seconds) for cache-control max-age header, e.g. -c10 for 10 seconds (defaults to '3600'). To disable caching, use -c-1.\n\n`-U` or `--utc` Use UTC time format in log messages.\n\n`-P` or `--proxy` Proxies all requests which can't be resolved locally to the given url. e.g.: -P http://someurl.com\n\n`-S` or `--ssl` Enable https.\n\n`-C` or `--cert` Path to ssl cert file (default: cert.pem).\n\n`-K` or `--key` Path to ssl key file (default: key.pem).\n\n`-r` or `--robots` Provide a /robots.txt (whose content defaults to 'User-agent: *\\nDisallow: /')\n`-f` or `--fallback` Provide a fallback url if response returns 404 - useful for SPA frameworks\n\n`-h` or `--help` Print this list and exit.\n\n## Example\n\n    http-serve ./dist --gzip -p /\n\nIt will run the http server for `./dist` content dirctory, with gzip commpression suport. All of the nonexistent routes will be redirected to the host's root - `/`.\n","_attachments":{},"homepage":"https://github.com/dkarmalita/http-serve#readme","bugs":{"url":"https://github.com/dkarmalita/http-serve/issues"},"license":"MIT"}