Skip to main content
Hono is a lightweight web framework optimized for Bun.

Installation

bun add hono

Basic Server

server.ts
import { Hono } from "hono";

const app = new Hono();

app.get("/", (c) => c.text("Hello Hono!"));

app.get("/api/hello/:name", (c) => {
  const name = c.req.param("name");
  return c.json({ message: `Hello ${name}!` });
});

export default {
  port: 3000,
  fetch: app.fetch,
};
Run with:
bun run server.ts

Features

  • Fast routing
  • Middleware support
  • TypeScript support
  • Built for Bun, Deno, and Cloudflare Workers

Hono Documentation

Learn more about Hono

Build docs developers (and LLMs) love