Express List Endpoints
![Maintainability](https://api.codeclimate.com/v1/badges/de84aedb98256b62c3ef/maintainability)
![NPM](https://nodei.co/npm/express-list-endpoints.png)
Express endpoint parser to retrieve a list of the passed router with the set verbs.
Example of use
const listEndpoints = require('express-list-endpoints')
let app = require('express')();
app.route('/')
.all(function namedMiddleware(req, res) {
})
.get(function(req, res) {
})
.post(function(req, res) {
});
app.route('/about')
.get(function(req, res) {
});
console.log(listEndpoints(app));
Arguments
app
- Express app
or router
instance
Your router instance (router
) or your app instance (app
).
Note: Pay attention that before call this script the router or app must have the endpoints registered due to detect them.
license
MIT