render-routes
Give it a routes object and it spits out html that you can load into your browser.
Last updated 7 years ago by thlorenz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install render-routes 
SYNC missed versions from official npm registry.

render-routes build status

Give it a routes object and it spits out html that you can load into your browser.

var renderRoutes = require('render-routes');
var express = require('express');
var app = express();

app.get('/routes', function (req, res) {
  res.send(renderRoutes(app.routes));
});

screenshot

Installation

npm install render-routes

API

/**
 * Takes a routes hash and returns html to be displayed in your browser.
 *
 * @name exports
 * @function
 * @param allRoutes {Object} i.e. { get: [ { path: '/foo' }, { path: '/bar' } ], post: [ { '/foo' } ] }
 * @return {String} html rendition of your routes
 */

License

MIT

Current Tags

  • 0.1.1                                ...           latest (7 years ago)

2 Versions

  • 0.1.1                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (1)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |