Skip to main content
Hono is a lightweight, ultrafast web framework designed for the edge and compatible with multiple runtimes, including Bun, Cloudflare Workers, Deno, and Node.js.

Quick start

Scaffold a new Hono project with the official template:
When prompted for a template, select bun:
Then install dependencies and start the dev server:
Open http://localhost:3000 to see your app.

Manual setup

1

Install Hono

2

Create a server

Hono integrates with Bun’s native HTTP server by exporting a fetch-compatible handler:
src/index.ts
3

Run the server

Routing

Hono supports all standard HTTP methods and dynamic route parameters:

Middleware

Hono provides built-in middleware and supports custom middleware functions:

JSX templating

Hono supports JSX for server-side HTML rendering without React:
src/index.tsx
Add the following tsconfig.json settings to enable Hono’s JSX factory:
tsconfig.json

Grouping routes

Use app.route() to group related routes into sub-applications:
See the Hono documentation for the complete guide to using Hono with Bun.