Hono is a lightweight, ultra-fast web framework built on Web Standards, designed to run on edge runtimes like Cloudflare Workers. Test your knowledge of its unique features.
0 / 5 completed
1 / 5
What is Hono's RPC mode and what problem does it solve?
Hono RPC works by exporting the app's route types and using hc<typeof app>(baseUrl) to create a typed client. The client's methods mirror the server routes exactly, giving you autocomplete and type errors if the request shape doesn't match — all without a separate schema file like OpenAPI or GraphQL.
2 / 5
How do you deploy a Hono application to Cloudflare Workers?
Hono is WinterCG-compliant, meaning it targets the standard Web APIs (Request/Response/fetch) that Cloudflare Workers implement natively. You just export export default app from your entrypoint and deploy with wrangler deploy — no adapter layer or compilation step is needed.
3 / 5
What does zValidator do in a Hono route definition?
zValidator from @hono/zod-validator is middleware that validates a specified part of the request ('json', 'query', 'param', etc.) against a Zod schema. If validation fails, it returns a 400 response automatically; if it passes, the validated data is typed in the handler's context — eliminating manual runtime type checks.
4 / 5
In Hono, middleware is applied using app.use(). What scope does app.use('/api/*', cors()) cover?
Hono's path-scoped middleware using glob patterns like /api/* applies the middleware to every route that matches the pattern. This lets you apply CORS, authentication, or logging selectively — for example, protecting all API routes while leaving static asset routes unaffected.
5 / 5
What is Hono's JSX support primarily used for?
Hono's JSX renderer (via hono/jsx) lets you write route handlers that return JSX which is rendered to an HTML string on the server. It's intentionally lightweight — not a full React runtime — making it ideal for server-rendered HTML endpoints in edge environments where bundle size matters.