Novice, Practiced, Mastered
    Wondering what’s next for npm?Check out our public roadmap! »

    express-routes-catalogue

    1.1.0 • Public • Published

    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

    enter image description here

     
    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

    enter image description here

     
    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

    1. Fork it!
    2. Create your feature branch: git checkout -b feature-name
    3. Commit your changes: git commit -am 'Some commit message'
    4. Push to the branch: git push origin feature-name
    5. Submit a pull request 😉😉

    LICENSE

    MIT © Vijay

    Install

    npm i express-routes-catalogue

    DownloadsWeekly Downloads

    382

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    56.6 kB

    Total Files

    10

    Last publish

    Collaborators

    • avatar