Nascent Personality Manifestation

npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

express-list-routes

0.1.4 • Public • Published

express-list-routes

List all routes used in Express.

NPM Version NPM Downloads

var expressListRoutes   = require('express-list-routes'),
    express             = require('express'),
    router              = express.Router();
 
app.use('/api/v1', router);
 
router.route('/user')
  .post(fn)
  .get(fn)
  .put(fn);
    
expressListRoutes({ prefix: '/api/v1' }, 'API:', router );
 

Will output

API:
POST   /api/v1/user
GET    /api/v1/user
PUT    /api/v1/user

Installation

$ npm install express-list-routes --save

Options

You can pass any three aguments of either a String Express Router or Options

Options Object

  {
    prefix: '', // The prefix for router Path
    spacer: 7   // Spacer between router Method and Path
  }

install

npm i express-list-routes

Downloadsweekly downloads

1,173

version

0.1.4

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability