TypeScript or nothing
One language from the phone to the database. Why every project I take on is TypeScript end to end, and why I stopped apologising for it.
Express shaped a generation of Node APIs. Why my new backends start with Hono instead, where it changes how I build, and when Express still wins.

Express is the framework everyone learns first. It's also the one I quietly stopped starting projects with.
Not because Express is bad. It carried Node APIs for over a decade and earned every bit of that. But the ground moved under it. We ship to Bun, to Workers, to edge runtimes. We write TypeScript by default. We expect the thing underneath us to know what a Response actually is. Express predates most of that, and you feel the gap on day one of a fresh build.
Hono calls itself a small, simple, and ultrafast web framework built on Web Standards. That last part is the one that matters. Here's the honest version of why my APIs start there now.
With Express, your handler gets (req, res), and both are loosely typed until you bolt on @types/express and hope the casts hold. With Hono, the types flow. Route params, validated bodies, context values: all of it is known at compile time.
import { Hono } from "hono"
const app = new Hono()
app.get("/posts/:id", (c) => {
const id = c.req.param("id") // string, inferred from the route, no casting
return c.json({ id })
})That c.req.param("id") is typed because the route string itself is part of the type. Rename the param and the compiler flags every stale reference. That's the difference between finding a bug in your editor and finding it in production logs at 2am.
Pair it with a schema validator and the inference reaches all the way into your handler body. The Hono validation guide covers the options; Zod is my default.
import { zValidator } from "@hono/zod-validator"
import { z } from "zod"
const schema = z.object({ title: z.string().min(1) })
app.post("/posts", zValidator("json", schema), (c) => {
const body = c.req.valid("json") // { title: string }
return c.json(body, 201)
})No manual parsing. No req.body as CreatePostDto. The validated shape is the type.
This is the part that made me stop looking back. With Hono RPC, you export the app's type from the server and hand it to a tiny client. The client then knows every route, every input, and every response shape. Your frontend autocompletes your backend. It's the same idea behind TypeScript from the phone to the database, applied right at the seam where most bugs hide.
Express assumes Node. Hono assumes the web standard Request and Response. Portable route code, provided its dependencies and platform APIs also support the target runtime. Hono's own Web Standards page lists Node.js, Bun, Deno, Cloudflare Workers, Fastly Compute, AWS Lambda, and Vercel among its targets.
| Express | Hono | |
|---|---|---|
| Runtime | Node.js | Node.js, Bun, Deno, Workers, Lambda, edge |
| Request model | Custom req / res objects | Web Request / Response |
| Routing | Middleware stack matched in order | SmartRouter picks RegExpRouter or TrieRouter at startup |
| TypeScript | Community type definitions | Written in TypeScript, inference built in |
| Typed client | Bring your own | Built-in RPC client |
| Ecosystem | Huge, mature, everywhere | Smaller, covers the essentials |
On a racket sports platform, the API is a Hono app running natively on Bun. Express would have worked. Hono meant less glue, and a mistyped route parameter became a compile error instead of a 500 at midnight. The BIM browser viewer follows the same pattern: its processing service is Hono on Bun, with thin routes and every external dependency behind an injectable seam.
When traffic is spiky and global, moving an API closer to users shouldn't mean rewriting it. Hono reduces the routing work involved, but database drivers, filesystem access, background jobs, execution limits and connection latency still need checking. Deploy a representative route before calling a migration easy. A nearby API with a faraway database can still spend its day waiting.
Express middleware mutates req and calls next(). It works. But the data flow is invisible. By the time your handler runs, you never quite know what's been stapled onto req, or by whom.
Hono middleware sets values on the context, and you can type them up front through the context Variables generic.
type Env = { Variables: { userId: string } }
const app = new Hono<Env>()
app.use(async (c, next) => {
c.set("userId", "u_123") // must be a string, the compiler checks
await next()
})
app.get("/me", (c) => c.json({ userId: c.get("userId") })) // typed as stringThe chain reads like a sentence, and the compiler knows what each step added.
Typing isn't magic. The Hono docs themselves warn that if you declare context variables globally, the types apply everywhere, even on routes where the middleware never ran, so an undefined can slip past unnoticed. I keep variables scoped to the routers that actually set them. Types are a promise. Only make promises you keep.
Here's the part that surprised me. The best API decision I made on the racket sports platform wasn't Hono. It was a two-function rule: every response goes out through a success() or error() helper, so the envelope is identical on every endpoint. Frontends check one field to know if a call worked.
Routes validate input and hand off. Services hold the business logic. The database layer talks to Postgres through Drizzle. Hono makes that layering pleasant, and it doesn't enforce it. You do.
A great framework with sloppy conventions loses to an average one with strict conventions, every time. Hono earns its place because it makes the strict version cheaper to write, not because it writes it for you.
I'm not here to sell you a rewrite. Express 5 closed some real gaps: according to the Express 5 migration guide, handlers that return rejected promises now forward the error to your error middleware automatically. That was one of the oldest papercuts in the framework, and it's fixed.
New services, anything on Bun or an edge runtime, and any API where a typed client will save the frontend team real hours. That's most of what I build. It might not be most of what you build, and that's completely fine.
Suppose a customer submits the same checkout twice because the first response disappears. A typed Hono client can tell you the response shape. It cannot decide whether that second request should create another order. Nor can it patch the runtime underneath it: the October 2026 Node.js security release was a reminder that a tidy route still runs on native code someone has to keep updated.
For a payment-related endpoint, I would write these acceptance cases before polishing the handler:
| Request | Expected behaviour |
|---|---|
| Malformed quantity | Validation error; no database write |
| Valid input, wrong merchant | Access denied; no information about another merchant's order |
| Same operation retried | Return the existing result or a clear in-progress state |
| Same operation key, different payload | Reject the mismatch |
| Provider timeout | Preserve a recoverable state; don't guess whether money moved |
Keep the operation key stable across retries and enforce its uniqueness transactionally. Generating a fresh key on every retry is a duplicate-order generator wearing an idempotency badge.
This is where I keep framework code thin: parse, authenticate, authorise, call the domain operation, map the result. Hono RPC helps clients use that contract. OWASP's authorisation guidance explains why permissions still need checking on every request. The food-delivery architecture shows why this separation matters once several apps share an API.
I run it in production. The racket sports platform's API and the BIM viewer's processing service are both Hono on Bun, handling bookings, payments, and heavy model conversion. It's actively maintained and the core API has been stable in my work.
No. Hono can mount inside a Next.js route handler or run as a separate service beside your existing one. Start with one new endpoint, feel the difference, then decide whether the rest is worth moving.
Smaller than Express, and the essentials are there: validation, auth, CORS, rate limiting. Because Hono speaks web standards, a lot of platform-native tooling works without a Hono-specific adapter. If you need a niche Express plugin, check for an equivalent before you commit.
Only if your users are spread out or your traffic spikes hard. For a single-region internal tool, the edge is a nice-to-have. The type safety is the reason to switch either way.
Hono's router is built for speed and the framework stays small. In most apps I build, though, the database query dominates response time, not the router. Pick Hono for the types and portability, and treat the speed as a bonus.
Both work, because both can hand a request to a Hono app. I compared the two frameworks in Next.js vs TanStack Start, and the short answer is that Hono fits either one without fuss.
Express taught Node how to serve HTTP. Hono assumes you already know that and hands you types that reach the client, portability across runtimes, and a middleware chain you can actually read. I still respect Express. I just don't start there anymore. If you're weighing a backend for something new, here's how I pick a stack, and if you want a second opinion on yours, tell me what you're building and I'll tell you honestly what I'd keep.
Was this useful?
No account needed. One like per browser; click again to undo.
Prabir Singh
Full-stack engineer in Mumbai. Twenty years in sales taught me why people buy; seven years of code taught me how to build what they'll pay for. I still read error messages the way I once read objections: as the most honest feedback of the day. More about me or start a project.
One language from the phone to the database. Why every project I take on is TypeScript end to end, and why I stopped apologising for it.
Web, mobile, API and shared packages in one Turborepo monorepo. How I run it, why one repo beats a folder of them, and when you shouldn't bother.
Server Components confuse people because the mental model is missing. Here's the kitchen picture that makes the split click, and the rules that keep it clean.