{"id":24350141,"url":"https://github.com/zweifisch/night-route","last_synced_at":"2026-04-21T17:31:20.954Z","repository":{"id":57311090,"uuid":"88415706","full_name":"zweifisch/night-route","owner":"zweifisch","description":"fast routing without regexp","archived":false,"fork":false,"pushed_at":"2017-04-20T13:34:52.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-19T22:03:31.920Z","etag":null,"topics":["koa","router"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zweifisch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-16T13:40:25.000Z","updated_at":"2017-04-16T14:16:50.000Z","dependencies_parsed_at":"2022-09-05T14:10:39.317Z","dependency_job_id":null,"html_url":"https://github.com/zweifisch/night-route","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fnight-route","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fnight-route/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fnight-route/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fnight-route/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zweifisch","download_url":"https://codeload.github.com/zweifisch/night-route/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243150330,"owners_count":20244367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["koa","router"],"created_at":"2025-01-18T13:27:13.094Z","updated_at":"2026-04-21T17:31:15.930Z","avatar_url":"https://github.com/zweifisch.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# night-route\n\n[![NPM Version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Node.js Version][node-version-image]][node-version-url]\n\nfast routing without regexp\n\n## using with koa\n\n```js\nconst { Router } = require('night-route/koa')\n\nlet router = new Router()\nrouter.get('/size/:width/:height', ctx =\u003e {\n    ctx.body = ctx.params.width * ctx.params.height\n})\n\napp.use(router.routes())\n```\n\n### in batch\n\n```js\nrouter.route('/posts', {\n  get (ctx) {}\n  post (ctx) {}\n})\n\nrouter.route('/posts/:id', middleware, middleware2, {\n  get (ctx) {},\n  put (ctx) {},\n  delete (ctx) {}\n})\n```\n\n### shorthands\n\n```js\nconst { GET } = require('night-route/koa')\n\napp.use(GET('/', ctx =\u003e {\n  ctx.body = \"index\"\n}))\n```\n\n### more http methods\n\n```js\nrouter.route('TRACE', ctx =\u003e {})\n```\n\n[npm-image]: https://img.shields.io/npm/v/night-route.svg?style=flat\n[npm-url]: https://npmjs.org/package/night-route\n[travis-image]: https://img.shields.io/travis/zweifisch/night-route.svg?style=flat\n[travis-url]: https://travis-ci.org/zweifisch/night-route\n[node-version-image]: https://img.shields.io/node/v/night-route.svg\n[node-version-url]: https://nodejs.org/en/download/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzweifisch%2Fnight-route","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzweifisch%2Fnight-route","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzweifisch%2Fnight-route/lists"}