Last Updated: 3/11/2026
Netlify
Netlify provides static site hosting and serverless backend services. Edge Functions enable dynamic web pages using Deno and TypeScript.
Setup
Create a new Netlify project:
npm create hono@latest my-appSelect netlify when prompted.
Hello World
Edit netlify/edge-functions/index.ts:
import { Hono } from 'jsr:@hono/hono'
import { handle } from 'jsr:@hono/hono/netlify'
const app = new Hono()
app.get('/', (c) => {
return c.text('Hello Hono on Netlify!')
})
export default handle(app)Run Locally
Start the development server with Netlify CLI:
netlify devAccess http://localhost:8888 in your browser.
Deploy
Deploy to Netlify:
netlify deploy --prodAccess Netlify Context
Access Netlify’s Context for geo-location and other data:
import { Hono } from 'jsr:@hono/hono'
import { handle } from 'jsr:@hono/hono/netlify'
import type { Context } from 'https://edge.netlify.com/'
type Env = {
Bindings: {
context: Context
}
}
const app = new Hono<Env>()
app.get('/country', (c) =>
c.json({
country: c.env.context.geo.country?.name,
})
)
export default handle(app)