Express List Endpoints
Express endpoint parser to retrieve a list of the passed router with the set verbs.
Example of use
const listEndpoints = let app = ; app all { // Handle request } ; app ; console;/* It omits the 'all' verbs.[{ path: '/', methods: ['GET', 'POST'] }, { path: '/about', methods: ['GET']}]*/
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