
Hono
hono.dev- Category
- Developer Tools
- Rank
- No. 313Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- honojs
- GitHub
- 32.2k stars
- Latest release
- v4.13.8
- Date
About
Tiny edge-ready web framework. Ultra-fast web framework that runs on Cloudflare Workers, Deno, Bun, Node, and AWS Lambda from the same codebase.
What it does
A server-side web framework for JavaScript and TypeScript. You create an app object, attach handlers to method and path pairs, and export it. Requests arrive as the platform's own Request objects and handlers return Response objects, so the same routing code runs on Cloudflare Workers, Deno, Bun, AWS Lambda or Node. Middleware composes as an onion: each layer awaits the next, then inspects or replaces what came back. Routing is pluggable, and the shipped default runs two matching strategies side by side and keeps whichever one can answer.
Why it's ranked here
Most of the value sits in one decision: the request and response types are the platform's own, not a bespoke wrapper. That is why one codebase deploys to edge runtimes and to Node, and why nothing beyond the Web Standard API is pulled in. The router is not hidden either, it is a constructor option, and the default hedges by racing two strategies at registration time. The cost is dense type machinery behind the ergonomics, and a per-runtime adapter for anything the standard does not cover. On a Workers-style runtime this is the sensible default pick.
What's good
Every capability is its own entry point. Authentication, CORS, compression, caching, JWT, static serving and JSX rendering each import separately, so what you skip never reaches the bundle. Error handling has one seam: an app-level handler catches anything a route throws, and exceptions carrying their own response are converted into that response. Sub-applications mounted under a prefix keep their own error handler wrapped around their routes. Request bodies are memoised after the first read, so two middleware layers can both parse a body without the second finding an already drained stream.
Tradeoffs
The generics are the price of the typed client. Handler signatures thread environment, schema, base path and current path through every method, so a mismatch surfaces as a long inference error rather than a plain one. Runtime coverage is real but uneven: each target needs its own adapter, and its own helpers for websockets and connection info, so a feature on one platform is not guaranteed on the next. When mounting a foreign application, the execution context is read inside a try block with an empty catch, so the mounted handler silently receives undefined. No data layer, no auth provider, no jobs.
How to use it well
Reach for it when the server runs on an edge runtime or a serverless function and you want routing, middleware and typed responses without a Node-shaped framework underneath. It suits APIs, webhook receivers and small full-stack apps returning JSON or server-rendered HTML. The typed client pays off when the frontend lives in the same repository. It covers none of the data layer: bring your own database driver, your own migrations, your own session store and your own auth provider. On Node you still supply a separate process entry point to hand incoming requests over.
Technical notes+
src/hono.ts is a thin subclass: it extends the base in src/hono-base.ts and injects a SmartRouter wrapping a RegExpRouter and a TrieRouter, which is the entirety of the default routing policy. src/hono-base.ts builds the method shorthands inside the constructor by iterating the method list exported from src/router.ts, so get, post and the rest are assigned dynamically rather than declared, and each call folds a route into the router plus a flat routes array. Dispatch runs through src/compose.ts, a koa-compose derivative that throws when next() is called twice and hands thrown errors to the app error handler before finalising the response. src/request.ts wraps the raw Request and caches body reads by parse type, re-serialising through a throwaway Response when a later read wants a different shape. jsr.json enumerates every public entry point and is the clearest map of the package surface.
Observed
- License
- MIT
- Language
- TypeScript
- Interface
- Library, imported into your own server entry point
- Install surface
- npm package, also published to JSR
- Runtimes
- Cloudflare Workers, Deno, Bun, AWS Lambda, Lambda@Edge, Node.js
- Dependencies
- Web Standard API only, no runtime packages
- Router
- Pluggable via a constructor option; regexp, trie, linear and pattern implementations ship in the package
Read from README.md, package.json, jsr.json, src/index.ts, src/hono.ts, src/hono-base.ts, src/compose.ts, src/context.ts, src/request.ts, src/router.ts, src/router/smart-router/index.ts, src/router/reg-exp-router/index.ts, src/router/trie-router/index.ts, src/validator/index.ts, src/adapter/cloudflare-workers/index.ts.
Tags
Tech Stack
Media

Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.