Table of Contents
- Express-style routing (
- Named URL parameters
- Named routes with URL generation
- Match routes with specific host
- Responds to
OPTIONSrequests with allowed methods
- Support for
405 Method Not Allowedand
501 Not Implemented
- Multiple route middleware
- Multiple and nestable routers
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
.get(), etc.), which matches Express 4 API.
npm install @koa/router
npm install @types/koa__router
See API Reference for more documentation.
MIT © Alex Mingoia