I need to get list of all the registered routes in Hono, similar to the one that Hapi's table() API or Fastify plugin fastify-print-routes.
Is there any internal API I can use to get this information? I cannot find anything from the official documentation!
The
hono/devpackage has ashowRoutesfunction that will log the routes to console. Hono documentationIt also has an
inspectRoutesthat's not in the documentation, but is used to generate the info inshowRoutes. It returns the information you're looking for (path, method). Source code