render-routes

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

npm install render-routes
5 downloads in the last week
10 downloads in the last month

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

npm loves you