Skip to Content

Last Updated: 3/9/2026


Dev Helper

Dev Helper provides useful methods you can use in development.

import { Hono } from 'hono' import { getRouterName, showRoutes } from 'hono/dev'

getRouterName()

You can get the name of the currently used router with getRouterName().

const app = new Hono() // ... console.log(getRouterName(app))

showRoutes()

showRoutes() function displays the registered routes in your console.

Consider an application like the following:

const app = new Hono().basePath('/v1') app.get('/posts', (c) => { // ... }) app.get('/posts/:id', (c) => { // ... }) app.post('/posts', (c) => { // ... }) showRoutes(app, { verbose: true, })

When this application starts running, the routes will be shown in your console as follows:

GET /v1/posts GET /v1/posts/:id POST /v1/posts

Options

verbose: boolean

When set to true, it displays verbose information.

colorize: boolean

When set to false, the output will not be colored.