0.1.1 • Published 6 years ago

@zcong/koa-router-show v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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