Skip to main content
doc0blade47/honodocumentation home
Sign in

Installation and Setup

Last updated Oct 12, 2026

Overview

Hono is a web framework built on Web Standards. Because it is designed to run on any JavaScript runtime, you can install it using your favorite package manager and deploy your application across multiple environments including Node.js, Deno, Bun, Cloudflare Workers, AWS Lambda, Vercel, and Netlify.

This guide covers how to install Hono and launch your first application across different runtimes using its public API.


Installation

You can install Hono using npm, yarn, pnpm, bun, or deno.

# Using npm
npm install hono
 
# Using yarn
yarn add hono
 
# Using pnpm
pnpm add hono
 
# Using bun
bun add hono

For Deno, you can import Hono directly from the JSR registry:

import { Hono } from 'jsr:@hono/hono'

Launching Your First Application

Basic Application Setup

To create a basic Hono application, instantiate the Hono class, define your routes using HTTP method functions such as app.get(), and return responses using helper methods like c.text() or c.json().

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

Runtime Adapters and Entry Points

Depending on the runtime environment where your application executes, you may need specific entry points or handlers to interface incoming requests with Hono's .fetch() method.

The table below lists the available runtime integration modules and supported adapters.

Integration / RuntimeModule Import PathPrimary Helper / Handler
Cloudflare Workershono/cloudflare-workersupgradeWebSocket, getConnInfo, serveStatic
Cloudflare Pageshono/cloudflare-pageshandle, handleMiddleware, serveStatic
Denohono/denoupgradeWebSocket, getConnInfo, serveStatic, toSSG
Bunhono/bunRuntime-native app.fetch
AWS Lambdahono/aws-lambdahandle, streamHandle, getConnInfo
Vercelhono/vercelhandle, getConnInfo
Netlifyhono/netlifyhandle
Lambda@Edgehono/lambda-edgehandle, getConnInfo
Service Workerhono/service-workerfire, handle

Tip

You can detect your running environment programmatically using getRuntimeKey() from hono/adapter.

Supported runtime keys: node, deno, bun, workerd, fastly, edge-light, other
(Sources: src/helper/adapter/index.ts)


Examples by Runtime

1. Cloudflare Workers

Cloudflare Workers execute Hono directly via the exported fetch handler or module worker default export.

import { Hono } from 'hono'
import { getRuntimeKey } from 'hono/adapter'
 
const app = new Hono()
 
app.get('/', (c) => c.text(`Hello from ${getRuntimeKey()}`))
 
export default app

2. AWS Lambda

Use the handle function from hono/aws-lambda to convert your Hono application into an AWS Lambda handler compatible with API Gateway, Application Load Balancers (ALB), and Function URLs.

import { Hono } from 'hono'
import { handle } from 'hono/aws-lambda'
 
const app = new Hono()
 
app.get('/', (c) => c.text('Hello from Lambda'))
 
export const handler = handle(app)

3. Vercel

Vercel serverless functions consume the handle wrapper from hono/vercel.

import { Hono } from 'hono'
import { handle } from 'hono/vercel'
 
const app = new Hono()
 
app.get('/', (c) => c.text('Hello from Vercel'))
 
export default handle(app)

4. Netlify

Netlify serverless functions integrate using the handle utility from hono/netlify.

import { Hono } from 'hono'
import { handle } from 'hono/netlify'
 
const app = new Hono()
 
app.get('/', (c) => c.text('Hello from Netlify'))
 
export default handle(app)
Was this page helpful?