{"name":"server-router","version":"6.0.0","description":"Server router","main":"index.js","scripts":{"deps":"dependency-check . && dependency-check . --extra --no-dev","test":"standard && npm run deps && NODE_ENV=test node test","test:cov":"standard && npm run deps && NODE_ENV=test istanbul cover test.js"},"repository":{"type":"git","url":"git+https://github.com/yoshuawuyts/server-router.git"},"keywords":["server","router","trie","wayfarer"],"license":"MIT","dependencies":{"pathname-match":"^1.1.3","urlencode":"^1.1.0","wayfarer":"^6.1.4"},"devDependencies":{"concat-stream":"^1.5.1","dependency-check":"^2.5.1","get-server-port":"^1.0.0","istanbul":"^0.4.1","standard":"^8.0.0","tape":"^4.2.2"},"gitHead":"811aaaaaa93a35c039a21b637fc02ef6d6fcb35a","bugs":{"url":"https://github.com/yoshuawuyts/server-router/issues"},"homepage":"https://github.com/yoshuawuyts/server-router#readme","_id":"server-router@6.0.0","_shasum":"6f018548f5909e67347a974f743f6ef9d837d19e","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.2","_npmUser":{"name":"lrlna","email":"shestak.irina@gmail.com"},"dist":{"shasum":"6f018548f5909e67347a974f743f6ef9d837d19e","tarball":"http://registry-npm.ywwl.com/server-router/download/server-router-6.0.0.tgz","integrity":"sha512-Q5Bd6QmUwzeTZbSBWSDEPAjXY+sdRlM0ASA8tsGNzi/DwnAkRD2JEmiMKaLhVXR7UuhWZYjKTAo7KAWu48BOdw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvFswN4Mhe2CHJw/udiDSYgUPaZ+1lhH56FHCeLtyeRAIhAKbzswq+3aqxesYeH2M4zAYyMPLPZi49Au6Dymrc5NwL"}],"size":3548,"noattachment":false,"key":"/server-router/-/server-router-6.0.0.tgz"},"maintainers":[{"name":"lrlna","email":"shestak.irina@gmail.com"},{"name":"watson","email":"w@tson.dk"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/server-router-6.0.0.tgz_1501582379238_0.5627419240772724"},"directories":{},"readme":"# server-router [![stability][0]][1]\n[![npm version][2]][3] [![build status][4]][5] [![test coverage][6]][7]\n[![downloads][8]][9] [![js-standard-style][10]][11]\n\nPerformant [radix-trie](https://en.wikipedia.org/wiki/Radix_tree) router for\nstreaming servers.\n\n## Usage\n```js\nvar serverRouter = require('server-router')\nvar http = require('http')\n\nvar router = serverRouter({ default: '/404' })\n\nrouter.route('GET', '/hello', function (req, res, params) {\n  res.end('hello world')\n})\n\nrouter.route('PUT', '/hello/:name', function (req, res, params) {\n  res.end('hi there ' + params.name)\n})\n\nrouter.route('', '/404', function (req, res, params) {\n  res.status = 404\n  res.end('404')\n})\n\nhttp.createServer(router.start()).listen()\n```\n\n## API\n### router = serverRouter(opts)\nCreate a new router with opts.\n\n### router.route(method|[methods], route, function (req, res, params))\nRegister a new route with an HTTP method name and a routename. Can register\nmultiple handlers by passing an array of method names. `params` contains\nmatched partials from the route.\n\n### router.match(req, res)\nMatch a route on a router.\n\n### handler = router.start()\nReturn a function that can be passed directly to `http.createServer()` and\ncalls `router.match()`.\n\n## Installation\n```sh\n$ npm install server-router\n```\n\n## See Also\n- [wayfarer](https://github.com/yoshuawuyts/wayfarer) - vanilla radix-trie\n  router\n- [nanorouter](https://github.com/yoshuawuyts/nanorouter) - client-side\n  radix-trie router\n\n## License\n[MIT](https://tldrlegal.com/license/mit-license)\n\n[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square\n[1]: https://nodejs.org/api/documentation.html#documentation_stability_index\n[2]: https://img.shields.io/npm/v/server-router.svg?style=flat-square\n[3]: https://npmjs.org/package/server-router\n[4]: https://img.shields.io/travis/yoshuawuyts/server-router/master.svg?style=flat-square\n[5]: https://travis-ci.org/yoshuawuyts/server-router\n[6]: https://img.shields.io/codecov/c/github/yoshuawuyts/server-router/master.svg?style=flat-square\n[7]: https://codecov.io/github/yoshuawuyts/server-router\n[8]: http://img.shields.io/npm/dm/server-router.svg?style=flat-square\n[9]: https://npmjs.org/package/server-router\n[10]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[11]: https://github.com/feross/standard\n[12]: https://github.com/yoshuawuyts/wayfarer\n","publish_time":1501582381014,"_cnpm_publish_time":1501582381014,"dist-tags":{"latest":"6.1.0"}}