JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 134453
  • Score
    100M100P100Q161877F
  • License MIT

A express package to list all registered endoints and its verbs

Package Exports

  • express-list-endpoints

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (express-list-endpoints) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Express List Endpoints

Express endpoint parser to retrieve a list of the passed router with the set verbs.

Example of use

router.route('/')
  .all(function(req, res) {
    // Handle request
  })
  .get(function(req, res) {
    // Handle request
  })
  .post(function(req, res) {
    // Handle request
  });

router.route('/about')
  .get(function(req, res) {
    // Handle request
  });

console.log(listEndpoints(router.stack));
/* It omits the 'all' verbs.
[{
    path: '/',
    methods: ['GET', 'POST']
  },
  {
    path: '/about',
    methods: ['GET']
}]
*/

license

MIT