This module if fork from koa-router, the most widely used router module in koa community, because of it is lake of activity now. Thanks for the greate work of @alexmingoia and the original team.
And now we need maintainers for this project. Anyone interested can creates pull requests to fixes bugs or implements new features, we will add active contributors as collaborators.
Router middleware for koa
- Express-style routing using
app.get
,app.put
,app.post
, etc. - Named URL parameters.
- Named routes with URL generation.
- Responds to
OPTIONS
requests with allowed methods. - Support for
405 Method Not Allowed
and501 Not Implemented
. - Multiple route middleware.
- Multiple routers.
- Nestable routers.
- ES7 async/await support.
- The API has changed to match the new promise-based middleware signature of koa 2. See the koa 2.x readme for more information.
- Middleware is now always run in the order declared by
.use()
(or.get()
, etc.), which matches Express 4 API.
Install using npm:
npm install @koa/router
Please submit all issues and pull requests to the koajs/koa-router repository!
Run tests using npm test
.
If you have any problem or suggestion please open an issue here.