DEV Community

Alex Spinov
Alex Spinov

Posted on

Hono Has a Free Web Framework — Ultrafast APIs on Any Runtime in 5 Minutes

Express Is 15 Years Old. Maybe It Is Time.

Express.js served us well. But it was built for a world where Node.js was the only JavaScript runtime. Today we have Deno, Bun, Cloudflare Workers, AWS Lambda, and Vercel Edge Functions.

Express works on exactly one of those.

Hono: One Framework, Every Runtime

Hono (meaning "flame" in Japanese) is an ultrafast web framework that runs on any JavaScript runtime. Same code, zero changes.

The Numbers

  • 14KB total size (Express is 200KB+)
  • 3x faster than Express on benchmarks
  • Zero dependencies — nothing to audit
  • Works on: Node.js, Deno, Bun, Cloudflare Workers, AWS Lambda, Vercel, Netlify, Fastly

Hello World in 4 Lines

import { Hono } from 'hono'
const app = new Hono()
app.get('/', (c) => c.text('Hello Hono!'))
export default app
Enter fullscreen mode Exit fullscreen mode

Deploy this to Cloudflare Workers and you have a globally distributed API in under 5 minutes.

Why Developers Are Switching

1. Type-Safe Routes

const route = app.get('/users/:id', (c) => {
  const id = c.req.param('id') // TypeScript knows this exists
  return c.json({ id })
})

// Client-side type inference
type AppType = typeof route
// Your frontend KNOWS the API shape at compile time
Enter fullscreen mode Exit fullscreen mode

2. Built-in Middleware

import { cors } from 'hono/cors'
import { jwt } from 'hono/jwt'
import { logger } from 'hono/logger'
import { compress } from 'hono/compress'

app.use('*', cors())
app.use('*', logger())
app.use('/api/*', jwt({ secret: 'your-secret' }))
app.use('*', compress())
Enter fullscreen mode Exit fullscreen mode

No npm install for each middleware. It is all included.

3. JSX Without React

app.get('/', (c) => {
  return c.html(
    <html>
      <body>
        <h1>Server-rendered HTML</h1>
        <p>No React. No hydration. Just HTML.</p>
      </body>
    </html>
  )
})
Enter fullscreen mode Exit fullscreen mode

When to Use Hono

  • Edge APIs on Cloudflare Workers or Vercel Edge
  • Microservices where size and speed matter
  • API gateways that need to be fast
  • Full-stack apps with the HonoX meta-framework

When to Stick With Express

  • Massive existing Express codebase (migration cost too high)
  • Team unfamiliar with TypeScript
  • Need specific Express middleware with no Hono equivalent

Get Started

npm create hono@latest my-app
cd my-app
npm run dev
Enter fullscreen mode Exit fullscreen mode

Building APIs that need web data? I maintain 88+ production scrapers for Reddit, Trustpilot, Google News, and more. Browse them on Apify or email spinov001@gmail.com for custom scraping solutions.

Top comments (0)