title: How to get all registered routes in Express?
body: <p>I have a web application built using Node.js and Express. Now I would like to list all registered routes with their appropriate methods.</p>
  <p>E.g., if I have executed</p>
  <pre><code>app.get('/', function (...) { ... });
  app.get('/foo/:id', function (...) { ... });
  app.post('/foo/:id', function (...) { ... });
  </code></pre>
  <p>I would like to retrieve an object (or something equivalent to that) such as:</p>
  <pre><code>{
    get: [ '/', '/foo/:id' ],
    post: [ '/foo/:id' ]
  }
  </code></pre>
  <p>Is this possible, and if so, how?</p>