The Edge Framework Problem
Express doesn't run on Cloudflare Workers. Fastify doesn't run on Deno Deploy. Each runtime needs its own framework.
Hono runs on every JavaScript runtime. Same code, 10+ deployment targets. Ultra-lightweight: 14KB.
What Hono Gives You
Simple, Express-Like API
import { Hono } from 'hono';
const app = new Hono();
app.get('/', (c) => c.text('Hello Hono!'));
app.get('/api/users/:id', (c) => {
const id = c.req.param('id');
return c.json({ id, name: 'John' });
});
export default app;
Middleware
import { cors } from 'hono/cors';
import { logger } from 'hono/logger';
import { bearerAuth } from 'hono/bearer-auth';
import { compress } from 'hono/compress';
app.use('*', logger());
app.use('*', cors());
app.use('/api/*', bearerAuth({ token: 'secret' }));
app.use('*', compress());
Validation (Zod Integration)
import { zValidator } from '@hono/zod-validator';
import { z } from 'zod';
app.post('/users',
zValidator('json', z.object({
name: z.string(),
email: z.string().email(),
})),
(c) => {
const body = c.req.valid('json'); // Fully typed
return c.json({ created: true, user: body });
}
);
JSX Templates
import { Hono } from 'hono';
import { html } from 'hono/html';
const Layout = ({ children }) => html`
<html><body>${children}</body></html>
`;
app.get('/', (c) => {
return c.html(
<Layout>
<h1>Welcome</h1>
</Layout>
);
});
RPC Client (Like tRPC)
// Server
const routes = app.get('/api/posts', (c) => c.json([{ id: 1, title: 'Hello' }]));
export type AppType = typeof routes;
// Client
import { hc } from 'hono/client';
import type { AppType } from './server';
const client = hc<AppType>('http://localhost:3000');
const posts = await client.api.posts.$get(); // Typed!
Performance
Hono on Bun: 300K+ requests/sec. On Cloudflare Workers: <1ms cold start.
Runs On
Cloudflare Workers, AWS Lambda, Vercel, Deno, Bun, Node.js, Netlify, Fastly.
Quick Start
npm create hono@latest
Why This Matters
The edge is the future of web apps. Hono gives you a framework that works on every edge runtime — write once, deploy anywhere.
Building edge APIs that need data? Check out my web scraping actors on Apify Store — data at the edge. For custom solutions, email spinov001@gmail.com.
Top comments (0)