/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-bindings-26f7bca63763-bindings-s0501-c0000.md
Bindings - hono-docs
Bindings Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt bindings Summary You can use Cloudflare...
Bindings
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#bindings
Summary
You can use Cloudflare Bindings like Variables, KV, D1, and others. Configure them in wrangler.jsonc. For example, to add a Variable named MY_NAME: ```jsonc { "$schema": "node_modules/wrangler/config-schema.json", "name": "my-app", "...
Content
You can use Cloudflare Bindings like Variables, KV, D1, and others.
Configure them in wrangler.jsonc. For example, to add a Variable named MY_NAME:
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "my-app",
"compatibility_date": "2025-08-03",
"main": "./src/index.tsx",
"vars": {
"MY_NAME": "Hono",
},
}To generate the types for your Bindings, run the cf-typegen script:
::: code-group
npm run cf-typegenyarn cf-typegenpnpm run cf-typegenbun run cf-typegen:::
This generates a CloudflareBindings interface. Pass it to Hono as generics:
const app = new Hono<{ Bindings: CloudflareBindings }>()Then access the Bindings via c.env:
app.get('/', (c) => {
return c.render(<h1>Hello! {c.env.MY_NAME}</h1>)
})