{"name":"server-router","version":"5.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":"3b14c64e429248a3cf5b31f7617b9a7bf6a865e0","bugs":{"url":"https://github.com/yoshuawuyts/server-router/issues"},"homepage":"https://github.com/yoshuawuyts/server-router#readme","_id":"server-router@5.0.0","_shasum":"44c7f516c9d82f372688f6b93fb51cf8f978830f","_from":".","_npmVersion":"4.1.2","_nodeVersion":"6.4.0","_npmUser":{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"},"dist":{"shasum":"44c7f516c9d82f372688f6b93fb51cf8f978830f","tarball":"http://registry-npm.ywwl.com/server-router/download/server-router-5.0.0.tgz","integrity":"sha512-S1PV0zs4sbr/ZgPGa8FcFapH3vQ/lqGcKzaPaJ4RxqtfPSEsyqAqS1xOHrDwosswSlL6rsvKJfR4HEfvwjFTMQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF3tccNzdhgMrARc1ajITHdd7FBGMntOb8JKrus/gB6gAiEAvKNyysFOjPByO6DjVlkmkNEXJpvosHb8S0qxfWNHzao="}],"size":3241,"noattachment":false,"key":"/server-router/-/server-router-5.0.0.tgz"},"maintainers":[{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/server-router-5.0.0.tgz_1492076820098_0.20156251196749508"},"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":1492076821924,"_cnpm_publish_time":1492076821924,"dist-tags":{"latest":"6.1.0"}}