Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Make sure these are defined;
- // Be sure to change your variable names if you name things otherwise
- // var express = require('express');
- // var app = express();
- app._router.stack.forEach(item => {
- if(item.route !== undefined
- && item.route.path !== undefined){
- console.log(`${item.route.stack[0].method.toUpperCase()}: ${item.route.path}`);
- }
- })
- // Returns something like this. 'GET /your/route/with/:params/'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement