Skip to content

Top 32 Hono Interview Questions and Answers [2026]

November 17, 2026 29 min read
Hono interview guide by Second Talent
TL;DR: Hono interviews in 2026 test whether a candidate can write one Web Standards app that runs on Cloudflare Workers, Bun, Deno and Node.js, keep its types intact from validator to RPC client, and spot the middleware ordering bugs that skip auth. Candidates should know Hono 4.13.17 (November 7, 2026), the move of runtime adapters into @hono/* packages in 4.13.10, and what the 5.0.0 release candidate breaks.

Since Hono 4.13.10, shipped on September 28, 2026, the runtime adapters live in their own packages, so import { serveStatic } from 'hono/bun' becomes import { serveStatic } from '@hono/bun', and the old paths are deprecated until v5 removes them.

The current stable release is Hono 4.13.17, and 5.0.0-rc.1 is published under the npm next tag. The questions below are for senior TypeScript backend and edge developer interviews, with five find-the-bug rounds.

Key takeaways
  1. 1Since 4.13.10, adapters such as @hono/bun and @hono/cloudflare-workers are separate packages; the hono/<runtime> imports are deprecated and gone in v5.
  2. 2Hono v5 is ESM only and requires Node.js 22.12 or later, per the migration guide in 5.0.0-rc.1 (October 10, 2026).
  3. 3A json validator test sent without a Content-Type: application/json header receives an empty object, so the test can pass for the wrong reason.
  4. 4The high-severity CORS advisory fixed in 4.12.25 let credentials: true with the default wildcard origin reflect any Origin.

Core Concepts and Runtimes

1. What is Hono, and why does building on Web Standards matter?

Hono is a small TypeScript web framework whose app is a function from a Fetch API Request to a Response.

Because app.fetch has that signature, the same code runs anywhere a runtime accepts a fetch handler: Cloudflare Workers, Deno, Bun, Fastly Compute, Vercel, Netlify, AWS Lambda through an adapter, and Node.js through @hono/node-server.

The practical consequences a candidate should name:

  • Headers, bodies, streams, URL and crypto.subtle are the platform's own objects, so code written against them ports between runtimes.
  • c.req is a HonoRequest wrapper, and c.req.raw is the underlying Request, which is what you pass to libraries that expect a standard request.
  • There is no Node req/res pair, so Express middleware does not plug in. On Node, the raw objects are reachable through c.env.incoming and c.env.outgoing when you need them.

A weak answer says "Hono is a fast Express for the edge". A strong answer explains that the fetch signature is the contract, and that the runtime differences move to bindings, static files, WebSockets and process lifetime.

2. How do you run the same app on Workers, Bun, Deno and Node.js?

Write the app once and change only the entry point. Workers and Bun accept a default export with a fetch method, Deno takes the handler in Deno.serve, and Node.js needs the adapter's serve, per the Node.js getting started guide.

// app.ts
import { Hono } from 'hono'
export const app = new Hono().get('/', (c) => c.text('ok'))

// Cloudflare Workers and Bun
export default app

// Deno
Deno.serve(app.fetch)

// Node.js
import { serve } from '@hono/node-server'
const server = serve({ fetch: app.fetch, port: 3000 })
process.on('SIGTERM', () => server.close(() => process.exit(0)))

The Node.js version is the only one where you own the server lifetime: serve() wraps node:http and returns the server, so graceful shutdown is your code.

On Workers, a module worker can export other handlers next to fetch, such as scheduled for cron triggers, by exporting an object with fetch: app.fetch.

3. Which router does Hono use by default, and when would you pick another preset?

The default hono import uses SmartRouter over RegExpRouter and TrieRouter. SmartRouter tries its routers in order and keeps the first one that supports every registered route.

RegExpRouter compiles all routes into one large regular expression, which makes matching fast, but it cannot express every pattern, so TrieRouter is the fallback.

  • hono/quick uses LinearRouter with TrieRouter. Registration is cheap, so it suits environments that build the app on every request.
  • hono/tiny uses PatternRouter, the smallest router, for size-limited deploys.
  • Workers and Deno Deploy run fine on the default preset, because the presets docs note that isolates persist for a while after boot.

A strong candidate knows the 4.13.0 change: RegExpRouter now throws UnsupportedPathError at registration rather than on the first matching request, so a bad route combination fails at startup.

4. How do you read configuration and bindings across runtimes?

On Workers, environment variables, secrets, KV, D1, R2, Queues and Durable Objects arrive per request as bindings on c.env.

You type them by passing a Bindings generic to new Hono, or generate them with wrangler types --env-interface CloudflareBindings, which avoids a name clash with Hono's own Env type.

type Bindings = { DB: D1Database; API_KEY: string }

const app = new Hono<{ Bindings: Bindings }>()

app.get('/users/:id', async (c) => {
  const row = await c.env.DB
    .prepare('SELECT id, name FROM users WHERE id = ?')
    .bind(c.req.param('id'))
    .first()
  return row ? c.json(row, 200) : c.json({ error: 'not found' }, 404)
})

For code that must read variables on several runtimes, env(c) from hono/adapter returns c.env on Workers and the process environment on Node.js, Bun and Deno, and getRuntimeKey() reports which runtime is running.

Both stay in the hono package in v5. A weak answer reads process.env at module scope, which fails on Workers and couples the app to Node.

5. Find the bug: this Worker sometimes shows one user another user's cart.

let currentUser: string | undefined
let cache = new Map<string, Cart>()

app.use(async (c, next) => {
  currentUser = c.req.header('x-user-id')
  await next()
})

app.get('/cart', async (c) => {
  const cart = cache.get(currentUser!) ?? (await loadCart(c.env.DB, currentUser!))
  cache.set(currentUser!, cart)
  return c.json(cart)
})

Module scope is shared by every request an isolate serves, and a Workers isolate handles many requests concurrently.

While request A awaits loadCart, request B overwrites currentUser, and A then caches B's id with A's cart or reads the wrong entry. The same bug appears on Bun, Deno and Node.js, which all serve concurrent requests in one process.

The fix is to keep per-request state on the context with c.set('user', ...) and c.var.user, whose lifetime is one request.

A module-level cache is acceptable only for data that is identical for every caller, and a senior candidate adds that an in-isolate Map is not shared across isolates or locations, so it is a hint, not a store.

Work that should finish after the response, such as writing the cache to KV, belongs in c.executionCtx.waitUntil().

6. How does Hono handle HEAD requests?

Hono converts a HEAD request to GET before routing, runs the GET handler and strips the body. Per the best practices guide, a handler registered with app.on('HEAD', ...) is never called.

If HEAD should skip expensive work, check c.req.method === 'HEAD' in middleware.

The question is small but it shows whether a candidate has read how dispatch works. A good follow-up: the new QUERY method from 4.13.0 has its own app.query() handler, because it carries a request body and is not mapped to GET.

Context, Routing and Errors

7. What is the Context object, and how do you pass values from middleware to handlers?

A Context is created for each request and lives until the response is returned.

It holds c.req, c.env, c.executionCtx on Workers, the response helpers (c.text, c.json, c.html, c.body, c.redirect, c.notFound) and a per-request key-value store.

type Variables = { user: { id: string; role: 'admin' | 'member' } }

const app = new Hono<{ Bindings: Bindings; Variables: Variables }>()

app.use('/api/*', async (c, next) => {
  const user = await verifySession(c.req.header('authorization'), c.env)
  if (!user) return c.json({ error: 'unauthorized' }, 401)
  c.set('user', user)
  await next()
})

app.get('/api/me', (c) => c.json(c.var.user))

c.get('user') and c.var.user read the same value. The Context docs are explicit that these values are retained only within one request. A candidate who reaches for a global Map keyed by request id has missed the point of the store.

8. What is the trade-off of augmenting ContextVariableMap?

Augmenting ContextVariableMap in declare module 'hono' types a variable globally, for every context in the app, whether or not the middleware that sets it ran.

A handler on a route without the auth middleware still sees c.get('user') typed as a user and gets undefined at runtime.

The safer pattern is to let types flow: pass Variables to new Hono, or write middleware with createMiddleware<{ Variables: ... }> and chain .use(), since each call returns an instance whose type includes the new variables.

Use the global map only for values set by middleware that runs on every route, such as a request id.

9. How do you structure a large Hono app?

Split it into sub-apps, one per resource, and mount them with app.route().

Write handlers inline after the path, not as Rails-style controller functions typed as (c: Context) => ..., because a detached handler loses path parameter inference and its response types never reach the RPC client.

// books.ts
export const books = new Hono<Env>()
  .get('/', (c) => c.json(listBooks(), 200))
  .get('/:id', (c) => c.json(getBook(c.req.param('id')), 200))

// index.ts
const app = new Hono<Env>().basePath('/api')
const routes = app.route('/books', books).route('/authors', authors)
export type AppType = typeof routes
export default app

For teams that want reusable handler sets anyway, createFactory() from hono/factory gives factory.createHandlers() and factory.createMiddleware() with inference intact.

A senior answer also knows the ordering trap in the routing docs: route() copies the sub-app's routes at call time, so calling app.route('/two', two) before two.route('/three', three) leaves /two/three/* returning 404.

10. Which route patterns does Hono support, and how is priority decided?

Path parameters (/user/:name), optional parameters (/api/animal/:type?), regex-constrained parameters (/post/:date{[0-9]+}/:title{[a-z]+}), wildcards (/wild/*/card), method arrays with app.on(['PUT', 'DELETE'], ...) and custom methods such as app.on('PURGE', ...).

Strict mode is on by default, so /hello and /hello/ are different routes unless you pass { strict: false }.

Priority is registration order, not specificity. Per the routing docs, handlers and middleware run in the order they were added, and the first handler that returns a response ends dispatch.

A app.get('*', ...) registered before app.get('/foo', ...) answers /foo itself, which is why fallbacks go last and middleware goes first.

11. How should errors and 404s be handled in Hono v4?

Throw HTTPException for expected failures and handle everything in app.onError.

If a handler or middleware throws, Hono catches it, passes it to onError or turns it into a 500, and sets c.error, so await next() does not throw and needs no try/catch.

import { HTTPException } from 'hono/http-exception'

app.post('/login', async (c) => {
  const ok = await checkPassword(c)
  if (!ok) throw new HTTPException(401, { message: 'invalid credentials' })
  return c.json({ ok: true }, 200)
})

app.onError((err, c) => {
  if (err instanceof HTTPException) return err.getResponse()
  console.error(err)
  return c.json({ error: 'internal error' }, 500)
})

app.notFound((c) => c.json({ error: 'not found' }, 404))

Two details separate senior answers. First, the HTTPException docs warn that getResponse() does not know about the context, so headers already set with c.header(), such as CORS headers, are not on that response.

Second, in v4 app.notFound is only called from the top-level app. Both rules change in v5 (question 30).

Middleware

12. What does this print for GET /?

app.use(async (_, next) => {
  console.log('A in')
  await next()
  console.log('A out')
})
app.use(async (c, next) => {
  console.log('B in')
  await next()
  c.header('x-b', '1')
  console.log('B out')
})
app.get('/', (c) => {
  console.log('handler')
  return c.text('hi')
})

It prints A in, B in, handler, B out, A out. Middleware runs in registration order before next() and in reverse order after it, the onion model shown in the middleware guide.

The header from B is on the response, because after next() the handler's response is in c.res, and c.header() writes to it.

A strong candidate adds the other post-processing option: replace the response by assigning c.res = new Response(...), which is how compression and ETag style middleware work.

13. Find the bug: the admin route is reachable without a token.

const app = new Hono()

app.get('/admin/stats', (c) => c.json(getStats()))

app.use('/admin/*', async (c, next) => {
  const token = c.req.header('authorization')
  if (!isValid(token)) return c.json({ error: 'forbidden' }, 403)
  next()
})

There are two bugs. The handler is registered before the middleware, and because dispatch follows registration order, GET /admin/stats reaches the handler, gets a response and never runs the check.

Move every app.use() above the routes it protects, or attach the middleware to the route itself: app.get('/admin/stats', auth, handler).

The second bug is next() without await. The middleware's promise resolves before the downstream chain finishes, so any code after next() runs too early, and errors from downstream are not tied to this middleware's flow.

Middleware must await next() or return a response. A candidate who only finds one of the two bugs is typical; finding the ordering bug first is the signal you want.

14. How do you write reusable, typed middleware?

Use createMiddleware from hono/factory, pass the Bindings and Variables it needs as a generic, and chain it with .use() so the variables it sets are typed for the handlers after it.

import { createMiddleware } from 'hono/factory'
import { getCookie } from 'hono/cookie'
import { HTTPException } from 'hono/http-exception'

export const requireUser = createMiddleware<{
  Bindings: { SESSION_KV: KVNamespace }
  Variables: { user: User }
}>(async (c, next) => {
  const id = getCookie(c, 'sid')
  const user = id ? await c.env.SESSION_KV.get<User>(id, 'json') : null
  if (!user) throw new HTTPException(401, { message: 'login required' })
  c.set('user', user)
  await next()
})

const app = new Hono()
  .use('/app/*', requireUser)
  .get('/app/profile', (c) => c.json({ name: c.var.user.name }, 200))

A weak answer writes async (c: Context, next: Next) => ... by hand and casts c.get('user') as User in every handler.

Since 4.10.0, responses returned from middleware also flow into the RPC client's types, so the 401 in a middleware like this one can be typed on the client too.

15. Which built-in middleware should a production app use, and what are their traps?

The built-ins ship inside the hono package with no external dependencies. The ones that matter in most APIs:

  • cors(): the default origin is *. With credentials: true, set an explicit origin list or callback; before 4.12.25 the wildcard plus credentials reflected any Origin (question 31).
  • csrf(): checks Origin and Sec-Fetch-Site for form-style requests on cookie-authenticated apps.
  • jwt(): both secret and alg are required options in the JWT middleware docs, which closes algorithm confusion. Read alg from config, never from the token header.
  • bodyLimit(): caps request size; patched in 4.12.16 for chunked requests and in 4.12.25 for Lambda.
  • secureHeaders(), logger(), requestId(), timing(), etag(), compress().
  • cache(): uses the Cache API. Since 4.12.18 it skips responses with Vary: Authorization or Vary: Cookie, but per-user responses should still send Cache-Control: private.

16. How do you configure middleware from bindings that only exist per request?

On Workers, c.env is not available at module load, so app.use(cors({ origin: env.ALLOWED_ORIGIN })) has nothing to read. Create the middleware inside a wrapper that has the context, and call it with (c, next).

app.use('/api/*', async (c, next) => {
  const mw = cors({
    origin: c.env.ALLOWED_ORIGINS.split(','),
    credentials: true,
  })
  return mw(c, next)
})

A senior candidate notices the cost: this builds a new middleware on every request. For options that never change during an isolate's life, they cache the built middleware in a variable after the first request.

That is safe because the value is the same for every caller, unlike the per-user state in question 5. Many built-ins also accept callbacks, such as origin: (origin, c) => ..., which avoids the wrapper.

Validation and the RPC Client

17. How does validation work in Hono?

A validator is middleware for one target: json, form, query, param, header or cookie. It returns the validated value or a response, and the handler reads the typed result with c.req.valid(target).

The core validator() in hono/validator is a thin hook; the validation guide recommends a schema library on top.

import * as z from 'zod'
import { zValidator } from '@hono/zod-validator'

const CreatePost = z.object({ title: z.string().min(1).max(120), body: z.string() })

app.post(
  '/posts/:id{[0-9]+}/comments',
  zValidator('param', z.object({ id: z.coerce.number() })),
  zValidator('json', CreatePost),
  (c) => {
    const { id } = c.req.valid('param')
    const input = c.req.valid('json')
    return c.json({ postId: id, ...input }, 201)
  }
)

@hono/zod-validator (0.9.1 on npm) wraps Zod; @hono/standard-validator (0.4.1) exposes sValidator, which accepts any Standard Schema library such as Zod, Valibot or ArkType.

A strong candidate mentions that the validator also feeds the RPC client its input types, so validation is where the API contract lives.

18. Find the bug: these validator tests pass, but production rejects valid requests.

app.post(
  '/orders',
  validator('header', (v, c) => {
    const key = v['Idempotency-Key']
    if (!key) return c.json({ error: 'missing key' }, 400)
    return { key }
  }),
  validator('json', (v) => v as Record<string, unknown>),
  (c) => c.json({ received: c.req.valid('json') }, 201)
)

// test
const res = await app.request('/orders', {
  method: 'POST',
  body: JSON.stringify({ sku: 'A1' }),
})
expect(res.status).toBe(400)

The header validator reads 'Idempotency-Key', but Hono passes header names in lowercase, so v['Idempotency-Key'] is always undefined and every request gets a 400, including correct ones. The key must be 'idempotency-key'.

The test passes because it expects 400 for a different reason.

The JSON half has its own trap: a json or form validator only parses the body when the request has the matching Content-Type. The test sends none, so the validator receives {}.

Tests must set headers: { 'Content-Type': 'application/json' }, and a pass-through validator like this one should reject an empty object.

That last point is a real security issue: before 4.13.16, a multipart/form-data request with an extra parameter such as charset also reached the form validator as an empty object while the handler could still read every field.

19. How does the Hono RPC client work?

You export the type of your route chain from the server, and the client built by hc<AppType>(baseUrl) mirrors it: client.posts.$post({ json }), client.posts[':id'].$get({ param }).

Inputs come from validators and outputs from c.json() calls, with no code generation step and no OpenAPI file in between.

// server
const routes = new Hono()
  .get('/posts/:id', async (c) => {
    const post = await findPost(c.req.param('id'))
    if (!post) return c.json({ error: 'not found' }, 404)
    return c.json({ post }, 200)
  })
export type AppType = typeof routes

// client
import { hc } from 'hono/client'
const client = hc<AppType>('https://api.example.com')
const res = await client.posts[':id'].$get({ param: { id: '42' } })
if (res.status === 404) {
  const { error } = await res.json()
} else if (res.ok) {
  const { post } = await res.json()
}

Passing the status to c.json() matters: the RPC guide shows that with explicit status codes the client can narrow the body type by res.status. Without them, the 404 and 200 bodies merge into one union and the client cannot tell them apart.

20. Find the bug: the client compiles, but every route is missing from its type.

const app = new Hono()

app.get('/posts', (c) => c.json(listPosts(), 200))
app.post('/posts', zValidator('json', NewPost), (c) => c.json(create(c.req.valid('json')), 201))

export type AppType = typeof app
export default app

typeof app is the type of new Hono() with no routes. Hono's route types accumulate in the return value of each .get() and .post() call, and statements on separate lines throw those return values away.

Chain the calls and export the type of the chain:

const app = new Hono()
  .get('/posts', (c) => c.json(listPosts(), 200))
  .post('/posts', zValidator('json', NewPost), (c) => c.json(create(c.req.valid('json')), 201))

export type AppType = typeof app

The same rule applies to testClient() in hono/testing and to app.route(): the type to export is the result of the chained route() calls, not the original instance. A candidate who has used RPC in a real project will have hit this.

21. The IDE slows down as the RPC app grows. What do you do?

Each route adds type instantiations that tsserver recomputes, and a large app can make autocompletion take seconds or fail with "Type instantiation is excessively deep". The RPC guide lists the fixes:

  • Match Hono versions on server and client packages in a monorepo; a mismatch is a common cause of the deep-instantiation error.
  • Set "strict": true in both tsconfig files, which the RPC types require.
  • Compile the client type ahead of time: export hcWithType from the server package so tsc computes the client type once and the editor reads a declaration file.
  • Split the client per sub-app instead of one client for the whole API.
  • Use TypeScript project references when the frontend imports AppType from another package.
// in the server package, compiled with tsc
import { hc } from 'hono/client'
import { app } from './app'

const client = hc<typeof app>('')
export type Client = typeof client
export const hcWithType = (...args: Parameters<typeof hc>): Client => hc<typeof app>(...args)

22. What did 4.11 and 4.12 add to the RPC client?

Several typed helpers that remove hand-written glue:

  • $url() returns a URL; since 4.11.0, passing the base URL as a second type parameter (hc<AppType, 'http://localhost:8787'>) makes it a precise typed URL, useful as an SWR or TanStack Query key.
  • $path() (4.12.0) returns only the path string, with params and query filled in, independent of the base URL.
  • ApplyGlobalResponse (4.12.0) adds error shapes from onError or global middleware, such as 401 and 500 bodies, to every route's response type.
  • parseResponse() (4.9.0) parses the body by content type and throws a DetailedError when the response is not ok.
  • Custom NotFoundResponse (4.11.0) through module augmentation, so c.notFound() has a typed body on the client.
  • buildSearchParams (4.11.0) customizes query serialization, for APIs that expect tags[]=a&tags[]=b.

A candidate does not need every helper by name. You are checking whether they know the client can be typed end to end, including errors, without an OpenAPI generator.

23. When would you choose OpenAPI over Hono RPC?

RPC works when the client is TypeScript and lives in the same repository or monorepo as the server, so the type import is cheap.

It does not help a mobile app in Swift or Kotlin, a partner integration, or any consumer that needs a published contract and versioning.

For public or multi-language APIs, generate an OpenAPI document from the same schemas, for example with the @hono/zod-openapi package from the Hono middleware repository, and keep the RPC client for the internal web app.

A strong candidate states the trade-off in both directions: RPC couples the client to the server's TypeScript types and Hono version, while OpenAPI adds a schema to maintain but survives a language change on either side.

JSX, Streaming and Testing

24. How do you render HTML with hono/jsx?

Set "jsx": "react-jsx" and "jsxImportSource": "hono/jsx" in tsconfig (Deno uses "jsx": "precompile" and @hono/hono/jsx in deno.json), rename the file to .tsx, and return components through c.html() or a renderer.

import type { FC, PropsWithChildren } from 'hono/jsx'

const Layout: FC<PropsWithChildren<{ title: string }>> = ({ title, children }) => (
  <html>
    <head><title>{title}</title></head>
    <body>{children}</body>
  </html>
)

app.use('/pages/*', async (c, next) => {
  c.setRenderer((content) => c.html(<Layout title="Dashboard">{content}</Layout>))
  await next()
})

app.get('/pages/home', (c) => c.render(<h1>Hello {c.req.query('name')}</h1>))

Values interpolated in JSX are escaped, so the query string above cannot inject markup. raw() from hono/html and dangerouslySetInnerHTML skip escaping and need reviewed input. hono/jsx/dom provides a small client runtime with React-style hooks, and since 4.13.0 its useRef and RefObject types match React 19.

25. Which hono/jsx security fixes should a team know from 2026?

JSX server rendering had a run of advisories this year, which is why the patch version matters for any app that renders user input:

  • Cross-request data disclosure: hono/jsx did not isolate context per request (fixed in 4.12.27), and memo() kept SSR output across requests (fixed in 4.12.34).
  • HTML injection through unvalidated tag names and attribute names (4.12.14 and 4.12.16), style object values (4.12.18), the cx() utility (4.12.27) and plain strings in boundary components (4.13.7).
  • The css helper did not escape a </style> split between template parts (4.13.16).

The list is in the Hono security advisories.

A strong candidate does not memorize it; they say they pin Hono, run a dependency audit in CI and read the release notes for "Security fixes" headings, which Hono puts at the top of patch releases.

26. How do you stream a response or send Server-Sent Events?

Use the helpers in hono/streaming: stream() for bytes, streamText() for text and streamSSE() for Server-Sent Events. Each returns a streaming Response and gives you a writer plus an onAbort hook for when the client disconnects.

import { streamSSE } from 'hono/streaming'

app.get('/events', (c) =>
  streamSSE(c, async (stream) => {
    let open = true
    stream.onAbort(() => { open = false })
    let id = 0
    while (open) {
      await stream.writeSSE({ event: 'tick', data: JSON.stringify({ at: Date.now() }), id: String(id++) })
      await stream.sleep(1000)
    }
  })
)

Probe two points. The candidate should stop work on abort, otherwise the loop keeps running and billing CPU after the client leaves.

They should also know that writeSSE data must not carry raw CR or LF from user input; 4.12.4 fixed an SSE field injection through exactly that. Streaming an LLM response token by token to a browser is the usual real-world case.

27. How do you test a Hono app?

Call app.request() with a path or a Request and assert on the returned Response. No server or port is needed, because the app is a fetch function. The third argument sets c.env, which is how you inject mocked bindings.

import { describe, it, expect } from 'vitest'
import app from './app'

const env = { API_KEY: 'test', DB: fakeD1() }

describe('POST /posts', () => {
  it('creates a post', async () => {
    const res = await app.request(
      '/posts',
      {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({ title: 'Hi', body: 'First' }),
      },
      env
    )
    expect(res.status).toBe(201)
    expect(await res.json()).toMatchObject({ title: 'Hi' })
  })
})

For typed calls, testClient(app) from hono/testing returns an RPC-style client, which needs the chained route definitions from question 20.

On Workers, the testing guide points to Cloudflare's Vitest integration, which runs tests in the Workers runtime with real D1 and KV bindings.

A strong candidate tests the unhappy paths: missing content type, wrong header case, expired token and the 404 shape.

28. When is Hono the wrong choice?

Hono fits APIs and server-rendered pages that run on edge or serverless platforms, or teams that want one framework across runtimes. It is a weaker fit in a few cases a senior candidate should be able to name:

  • A large Node.js service that depends on Express or Fastify plugins, or on Node stream APIs throughout, gains little from a Web Standards core.
  • Teams that want a batteries-included framework with an ORM, dependency injection and module system will rebuild those pieces; NestJS gives them up front.
  • Long-running CPU work does not belong in a Workers request, whatever the framework; it belongs in a queue consumer or a container.
  • RPC's type coupling (question 23) is a cost when frontend and backend release on separate schedules.

A weak answer picks frameworks by benchmark numbers alone. Hono's own fetch benchmark in the 4.13.0 notes measures between about 160 nanoseconds and 1 microsecond per request, which is rarely the bottleneck next to a database round trip.

What Changed Recently

Oct 16, 2025
Hono 4.10.0: middleware responses are typed in the RPC client; cloneRawRequest added
Dec 13, 2025
Hono 4.11.0: typed $url(), custom NotFoundResponse, tryGetContext()
Feb 19, 2026
Hono 4.12.0: $path(), ApplyGlobalResponse, TrieRouter 1.5x to 2.0x faster
Apr 21, 2026
@hono/node-server 2.0.0: Node.js 20 or later, up to 2.3x throughput, built-in WebSockets
Jun 9, 2026
Hono 4.12.25 fixes the high-severity CORS credentials advisory
Aug 3, 2026
Hono 4.13.0: QUERY method, Method Not Allowed middleware, faster core path
Sep 28, 2026
Hono 4.13.10 splits runtime adapters into @hono/* packages
Oct 10, 2026
Hono 5.0.0-rc.1 published under the next tag
Nov 7, 2026
Hono 4.13.17, the current stable release

29. What did Hono 4.13 change?

The 4.13.0 release on August 3, 2026 focused on speed and the new HTTP QUERY method:

  • Performance: up to 1.25x faster on the JSON route of Hono's fetch benchmark, from skipping Headers allocations and allocating state lazily.
  • QUERY method: app.query() handles a safe, idempotent method that carries a body. The cache middleware keys QUERY responses on a SHA-256 digest of the body, and that change altered the internal cache key format for every method, so code that purges cache entries by URL outside the middleware needs updating.
  • CORS: the default Access-Control-Allow-Methods now includes QUERY.
  • Method Not Allowed middleware in hono/method-not-allowed returns 405 with an Allow header.
  • RegExpRouter throws UnsupportedPathError at registration.

Then 4.13.10 moved the adapters to @hono/aws-lambda, @hono/bun, @hono/cloudflare-workers, @hono/deno (also on JSR), @hono/lambda-edge, @hono/netlify, @hono/service-worker and @hono/vercel, and deprecated hono/cloudflare-pages with no replacement, since Cloudflare recommends Workers with static assets.

30. What breaks in Hono v5?

The v5 migration guide in the release candidate lists these changes:

  • ESM only, and Node.js 22.12 or later; require('hono') still works because Node 22.12 can require() ES modules.
  • Adapters removed from the core package; import from the @hono/* packages. hono/adapter stays.
  • onError() takes (c, next) and reads the error from c.error. onError() and notFound() accept a path and several middleware, and registrations compose instead of replacing each other.
  • Non-Error throws, such as a thrown string, go to onError wrapped in an Error with the original value on cause.
  • Stricter types: c.req.json() returns unknown, and c.req.query() without a key returns values typed string | undefined.
  • c.json(undefined) throws a TypeError, like Response.json().
  • Wildcards match the same way in every router.
  • Removed APIs: app.fire(), app.mount() (use mount() from hono/mount), req.matchedRoutes and req.routePath (use hono/route).
// v4
app.onError((err, c) => c.json({ error: err.message }, 500))

// v5
app.onError((c) => c.json({ error: c.error?.message ?? 'error' }, 500))

v5 is a release candidate, not a stable release, as of November 2026. The practical answer for production is to move adapter imports now, on 4.13.10 or later, so the v5 upgrade is mostly the onError signature and type fixes.

31. Which 2026 security advisories should a Hono team have patched?

The one rated high was GHSA-88fw-hqm2-52qc (CVE-2026-54290), fixed in 4.12.25: with credentials: true and the default wildcard origin, the CORS middleware reflected the caller's Origin and sent Access-Control-Allow-Credentials: true, so any site could read cookie-authenticated endpoints.

Others with clear interview value:

  • Middleware bypass on static paths: repeated slashes in serveStatic (4.12.12) and a second path decode (4.13.11).
  • JWT middleware accepted any Authorization scheme, not only Bearer (4.12.21).
  • Cookie helpers allowed attribute injection through domain, path, sameSite and priority (4.12.4 and 4.12.21).
  • Router and mount bypasses of path-scoped middleware, plus the multipart/form-data validator skip from question 18 (4.13.16).

The pattern across them is path normalization and header parsing, the two places where an edge framework sits between a proxy and an app.

A strong candidate connects that to their own code: authorization belongs in middleware scoped by path, so a path that normalizes differently than expected is the threat model to test.

32. What changed in @hono/node-server 2?

Version 2.0.0 shipped on April 21, 2026 with the same public API and a faster request path. The release notes report up to 2.3x the throughput of v1 on a body-parsing benchmark.

It has two breaking changes: it requires Node.js 20 or later, and it removed the @hono/node-server/vercel adapter.

WebSockets are now built in. You create a ws WebSocketServer with { noServer: true }, pass it as the websocket option to serve(), and use upgradeWebSocket from @hono/node-server; the separate @hono/node-ws package is deprecated.

The current release is 2.1.6, and the 1.19 line still receives patches for teams on Node 18.

Signs of a Strong Answer

  • They register middleware above the routes it protects and can explain why registration order, not path specificity, decides what runs.
  • They keep per-request state on c.set and c.var, and treat module scope in an isolate as shared by concurrent requests.
  • They chain route definitions, pass explicit status codes to c.json(), and know why both matter for the RPC client.
  • They test validators with the right Content-Type and lowercase header keys, and make pass-through validators reject empty objects.
  • They read bindings from c.env per request and build env-dependent middleware inside the request.
  • They know the deployed Hono patch version, have moved to @hono/* adapter imports, and can list what v5 changes in onError.

Hiring Hono Developers

Engineers who have shipped Hono on Workers or Bun, kept an RPC client typed across a monorepo and patched through this year's advisories are rare on general job boards.

Second Talent helps US startups hire vetted AI-Native Engineers from Asia, including TypeScript developers and Node.js developers, screened with questions like these.

For related stacks, see our TypeScript, Node.js and Express.js interview guides.

Rates run $23 to $39 USD an hour, billed monthly, with matches in 24 hours and a 90-day one-time replacement guarantee. Compare rates on the cost to hire a TypeScript developer page, or tell us what you need.

Get developers who ship with AI agents. Starts at $25/Hour.

Start Hiring $0 cost until you hire