Skip to content

wachunei/koa-router

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

koa-router

NPM version NPM Downloads Node.js Version Build Status Tips Gitter Chat

Call for Maintainers

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 and 501 Not Implemented.
  • Multiple route middleware.
  • Multiple routers.
  • Nestable routers.
  • ES7 async/await support.

Migrating to 7 / Koa 2

  • 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.

Installation

Install using npm:

npm install @koa/router

Contributing

Please submit all issues and pull requests to the koajs/koa-router repository!

Tests

Run tests using npm test.

Support

If you have any problem or suggestion please open an issue here.

About

Router middleware for koa.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.0%
  • Other 1.0%