express-routemap
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/express-routemap package

1.6.0 • Public • Published

Display all your express routes in the terminal!

HOW TO:

npm install express-routemap

  // in your index.js:
 
  const express = require('express'),
        displayRoutes = require('express-routemap');
 
  var app = express();
 
  var adminRouter = require('./routes/admin');
 
  app.use('/admin', adminRouter);
 
  app.get('/', (req, res) => {
    res.render('index');
  });
 
  app.listen(3000, () => {
    console.log('Web server started at port 3000!');
    // HERE IS THE FUN PART:
    displayRoutes(app);
 
    // or use like this
    displayRoutes(app, 'route-table.log');
  });

Readme

Keywords

Package Sidebar

Install

npm i express-routemap

Weekly Downloads

1,130

Version

1.6.0

License

MIT

Unpacked Size

3.51 kB

Total Files

4

Last publish

Collaborators

  • izelnakri