• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

koajs/router: Router middleware for koa.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

koajs/router

开源软件地址:

https://github.com/koajs/router

开源编程语言:

JavaScript 99.0%

开源软件介绍:

@koa/router

Router middleware for Koa.

NPM version NPM Downloads Node.js Version Build Status gitter

  • Express-style routing (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 and nestable routers
  • 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

# npm .. 
npm i @koa/router
# yarn .. 
yarn add @koa/router

Typescript Support

To install types:

# npm .. 
npm i @types/koa__router
# yarn .. 
yarn add @types/koa__router

API Reference

See API Reference for more documentation.

Contributing

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

Support

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

Call for Maintainers

This module is forked from the original koa-router due to its lack of activity. koa-router is the most widely used router module in the Koa community and we need maintainers. If you're interested in fixing bugs or implementing new features feel free to open a pull request. We'll be adding active contributors as collaborators.

Thanks to the original authors @alexmingoia and the original team for their great work.

License

MIT




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap