koa-router-show
Install
$ yarn add @zcong/koa-router-show
Usage
const Koa = require('koa')
const Router = require('koa-router')
const koaRouterShow = require('@zcong/koa-router-show')
const app = new Koa()
const router = new Router()
router.get('/', () => {})
router.get('/user/:name', () => {})
// use it after registing all the routers
koaRouterShow(router)
app.use(router.routes())
app.use(router.allowedMethods())
app.listen()
// will show all the routers in text-table and router
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Author
koa-router-show © zcong1993, Released under the MIT License.
Authored and maintained by zcong1993 with help from contributors (list).
github.com/zcong1993 · GitHub @zcong1993