Skip to content

Instantly share code, notes, and snippets.

@genediazjr
Created December 6, 2016 18:20
Show Gist options
  • Save genediazjr/282f318b7525f5e604658dea67c6d1ae to your computer and use it in GitHub Desktop.
Save genediazjr/282f318b7525f5e604658dea67c6d1ae to your computer and use it in GitHub Desktop.
List all routes from a hapi server
server.table()[0].table.forEach((route) => console.log(`${route.method}\t${route.path}`));
@jsubida
Copy link

jsubida commented Sep 26, 2018

The following works for Hapi 17:

server.table().forEach((route) => console.log(`${route.method}\t${route.path}`));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment