- Notifications
You must be signed in to change notification settings - Fork0
Provide a faster router for Koa, and support configurable routes for Koa or express.
License
NotificationsYou must be signed in to change notification settings
koayjs/koay-router
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Note: Provide a faster router for Koa, and support configurable routes for Koa or express.
Router middleware forkoa
- Express-style routing using
app.get,app.put,app.post, etc. - Named URL parameters.
- Named routes with URL generation.
- Multiple route middleware.
- Multiple routers.
- Nestable routers.
- ES7 async/await support.
Install usingnpm:
npm install koay-router --save
- koay-router
Router
- new Router([opts])
instance
- .get|put|post|patch|delete|del ⇒
Router - .routes ⇒
function - .use([path], middleware)] ⇒
Router - .prefixWith(prefix) ⇒
Router - .redirect(source, destination, [code]) ⇒
Router - .route(name) ⇒
Route|null - .url(name, params, [options]) ⇒
String
- .get|put|post|patch|delete|del ⇒
static
- .url(path, params, [options]) ⇒
String
- .url(path, params, [options]) ⇒
- new Router([opts])
Controller
- new Controller([opts])
- instance
- routes ⇒
function
- routes ⇒
- instance
- new Controller([opts])
About
Provide a faster router for Koa, and support configurable routes for Koa or express.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
