express-list-routes-cuz
List all routes used in Express[3,4,5]
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
Example App
const express = require('express');
const ExpressListRoutes = require('express-list-routes-cuz');
var expressListRoutes = new ExpressListRoutes();
const app = express();
app.get('/health', fn)
app.use('/admin', router);
router.route('/user')
.post(fn)
.get(fn)
.put(fn);
List all Routes with prefix
expressListRoutes.discover(app, { prefix: '/api/v1' });
Or only log out nested router routes
expressListRoutes.discover(router);
Get all routes after discover from every where
const routes = expressListRoutes.getRoutes();
Installation
npm install express-list-routes-cuz
Options
You can pass a second argument to set some options
{
prefix: '',
spacer: 7,
showLog: false
}