Created
December 6, 2016 09:22
-
-
Save CatTail/ce13a4f775a8b2877f313760d613ee67 to your computer and use it in GitHub Desktop.
Get all registered routes in Express
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app._router.stack // registered routes | |
| .filter(r => r.route) // take out all the middleware | |
| .map(r => r.route.path) // get all the paths |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something more sophisticated https://github.com/AlbertoFdzM/express-list-endpoints.