Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Repository files navigation

NPM package

Note: Provide a faster router for Koa, and support configurable routes for Koa or express.


NPM versionNPM Downloads

Router middleware forkoa

  • Express-style routing usingapp.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.

Installation

Install usingnpm:

npm install koay-router --save

API Reference

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

          • .url(path, params, [options]) ⇒String
    • Controller

      • new Controller([opts])
        • instance
          • routes ⇒function

Examples

About

Provide a faster router for Koa, and support configurable routes for Koa or express.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp