diff --git a/index.js b/index.js index b980638..661d163 100644 --- a/index.js +++ b/index.js @@ -116,6 +116,13 @@ app.use(function(req, res, next) { app.get('/', (req, res) => { res.send( instructions ) + // see issue 20 +}) + +app.get('/routes', (req, res) => { + let routes = app._router.stack.map( r => r.route?.path ).filter( r => typeof(r) == 'string' ) + let formattedRoutes = routes.map( r => `
  • ${r}
  • ` ).join('\n') + res.send( formattedRoutes ) }) app.get('/authtestviaheader', (req, res) => {