Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-route-log

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-route-log

Logs express routes to console

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 29 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc