Hono is an ultrafast web framework for the edge. It runs on Cloudflare Workers, Deno, Bun, Vercel, AWS Lambda, and Node.js — same code everywhere.
What Is Hono?
Hono (Japanese for flame) is a small, fast web framework with zero dependencies. It is 3x faster than Express and works on every JavaScript runtime.
Key features:
- Multi-runtime (Cloudflare, Deno, Bun, Node.js)
- TypeScript-first
- Built-in middleware
- OpenAPI support
- RPC client
- 14KB minified
Quick Start
npm create hono@latest my-app
cd my-app
npm run dev
API Example
import { Hono } from "hono";
import { cors } from "hono/cors";
import { jwt } from "hono/jwt";
const app = new Hono();
app.use("/api/*", cors());
app.get("/", (c) => c.json({ message: "Hello Hono!" }));
app.get("/api/users", (c) => {
return c.json([{ id: 1, name: "Alice" }, { id: 2, name: "Bob" }]);
});
app.post("/api/users", async (c) => {
const body = await c.req.json();
return c.json({ created: true, user: body }, 201);
});
app.get("/api/users/:id", (c) => {
const id = c.req.param("id");
return c.json({ id, name: "Alice" });
});
export default app;
Deploy Anywhere
# Cloudflare Workers
npx wrangler deploy
# Deno
deno serve app.ts
# Bun
bun run app.ts
# Node.js
node --import tsx app.ts
Use Cases
- Edge APIs — Cloudflare Workers
- Microservices — lightweight, fast
- API gateways — routing + middleware
- Serverless — Lambda, Vercel
- Full-stack — with htmx or React
Hono vs Alternatives
| Feature | Hono | Express | Fastify |
|---|---|---|---|
| Speed | Fastest | Slow | Fast |
| Size | 14KB | 200KB | 100KB |
| TypeScript | Native | Partial | Good |
| Edge support | Yes | No | No |
| Multi-runtime | Yes | Node only | Node only |
Need web data at scale? Check out my scraping tools on Apify or email spinov001@gmail.com for custom solutions.
Top comments (0)