Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9311657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:25:40+00:00 2026-06-19T01:25:40+00:00

I have a web application built using Node.js and Express. Now I would like

  • 0

I have a web application built using Node.js and Express. Now I would like to list all registered routes with their appropriate methods.

E.g., if I have executed

app.get('/', function (...) { ... });
app.get('/foo/:id', function (...) { ... });
app.post('/foo/:id', function (...) { ... });

I would like to retrieve an object (or something equivalent to that) such as:

{
  get: [ '/', '/foo/:id' ],
  post: [ '/foo/:id' ]
}

Is this possible, and if so, how?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T01:25:42+00:00Added an answer on June 19, 2026 at 1:25 am

    express 3.x

    Okay, found it myself … it’s just app.routes 🙂

    express 4.x

    Applications – built with express()

    app._router.stack

    Routers – built with express.Router()

    router.stack

    Note: The stack includes the middleware functions too, it should be filtered to get the “routes” only.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, I have a PHP Web application built using Zend Framework and MVC with
We have an web application build using node js (express js), which is behind
I have built a web application using Java EE platform that sells one of
I have built a little web application with several *.js files. I am using
We have a web based application in production built using django. It is deployed
I have a chat application backend built using Web Api where I am exposing
I have a web service application built using NodeJS. I am using mongodb as
I have a web application that needs to be built using PHP/MySQL. The application
I have a web application built using Symfony2, in which some items are shared
We have a web application that has been built using MySQL / PHP /

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.