express-routes-catalogue
v1.1.0
Published
This package list out all the routes in the express.js application
Downloads
917
Maintainers
Readme
express-routes-catalogue
A simple utility that lists out all registered routes in your express application.
Installation
npm install -D express-routes-catalogue
Example
1. Terminal Output
const express = require("express");
const routeList = require("express-routes-catalogue");
const app = express();
app.get("/", (req, res) => {
res.send("Hello World ...");
});
// For terminal output
if (process.env.NODE_ENV === "development") {
routeList.terminal(app);
}
...
2. Web output
const express = require("express");
const routeList = require("express-routes-catalogue");
const app = express();
app.get("/", (req, res) => {
res.send("Hello World ...");
});
// For web output
if (process.env.NODE_ENV === "development") {
routeList.web(
app,
"/route-list"
);
}
...
Now navigation to your-application/route-list, you can see full routes list.
Contribution
- Fork it!
- Create your feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -am 'Some commit message'
- Push to the branch:
git push origin feature-name
- Submit a pull request 😉😉
LICENSE
MIT © Vijay