npm

Share private packages across your team with npm Orgs, now with simplified billing via the aws marketplace!Learn more »

express-route-log

0.0.2 • Public • Published

Express route log

npm install express-route-log

Use to log your Express.js app routes. Nice in a dev environment, just for sanity check or whatever.

Have had the script kicking around for a while in a few projects so just getting it out there.

Supports standard route structures, nested routers, etc. Just require it in after your routes have been defined.

Optional second param is a function to use in place of console.log.

Usage

 
const express = require('express');
const app = express();
 
app.get('/', (req, res, next) => {
  //...
});
 
app.get('/pageOne', (req, res, next) => {
  //...
});
 
app.post('/pageTwo', (req, res, next) => {
  //...
});
 
require('express-route-log')(app);
 
// prints out the following:
 
/*
Routes:
GET /
GET /pageOne
POST /pageTwo
*/

Example output

install

npm i express-route-log

Downloadsweekly downloads

101

version

0.0.2

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability