Getting Started
Core Concepts
Built-In Middleware
Advanced Features
Troubleshooting
Hono is a web framework built on Web Standards, designed to be fast, lightweight, and compatible with a wide range of JavaScript runtime environments including Node.js, Bun, Deno, Cloudflare Workers, and more.
Getting started with Hono is straightforward because it is designed to work out-of-the-box with modern JavaScript project structures.
You can install Hono using your preferred package manager. Hono is available as the hono package on npm.
Initialize your project (if you haven't already):
npm init -yInstall the package:
npm install honoTip
If you are using Bun, you can simply run bun add hono to install the dependency.
Once installed, you can import Hono directly into your application code. Since Hono is built on Web Standards, it uses the standard Request and Response objects.
import { Hono } from 'hono'
const app = new Hono()
app.get('/', (c) => c.text('Hello Hono!'))
export default app./adapter export) that allow it to run on specific platforms like Cloudflare Workers, Deno, Bun, AWS Lambda, and Vercel. These adapters translate platform-specific events into the Web Standard objects Hono expects.import { Hono } from 'hono/tiny'.Basic Auth, CORS, Logger, and JWT are available as optional imports, keeping the core library small.Hono is designed to be environment-agnostic. You can deploy it to any of the following:
Note
When running on Node.js, ensure your project is configured as an ES Module (set "type": "module" in your package.json) to fully support the modern import syntax.
Warning
If you encounter issues with TypeScript resolution, ensure your tsconfig.json includes the necessary library definitions (such as dom and dom.iterable) to support the Web Standards APIs that Hono relies on.
Important
Always prefer using the official exported sub-paths (e.g., hono/cors, hono/jwt) rather than reaching into the library's internal src directory. This ensures compatibility and type safety across updates.