@zcong/koa-router-show
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

koa-router-show

NPM version NPM downloads CircleCI codecov donate

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

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. 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

Readme

Keywords

none

Package Sidebar

Install

npm i @zcong/koa-router-show

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

4.94 kB

Total Files

5

Last publish

Collaborators

  • zcong