express-table-router
Print a table associated with a express router
Last updated 5 years ago by kikobeats .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install express-table-router 
SYNC missed versions from official npm registry.

express-table-router

Build Status Dependency status Dev Dependencies Status NPM Status Gittip

Print a table associated with a express router

Install

npm install express-table-router

Usage

tableRouter = require 'express-table-router' --save

You can pass a default settings for each table:

options =
	style: head: ['green']

tableRouter = require('express-table-router')(options)

See cli-table for more information about the options.

Later in your code need to pass a router express Object and optionally a specific options for the table:

tableOne = table.create(router.stack)
tableOne.show()

Also you can chain methods:

tableOne = table.create(router.stack).show()

An example of pattern for print table and register in express:

for route in ["client", "address", "direction", "contact"]
  router = require "./api/#{route}"
  app.use router
  table.create(router.stack).show()

License

MIT © Kiko Beats

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

1 Versions

  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (3)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |