/Knowledge/sources/honojs__hono/llms-full/cloudflare-workers-vite-bindings--092767153bdd.md

Cloudflare Workers + Vite: Bindings - hono-docs

Cloudflare Workers + Vite: Bindings Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt bindings Summary Y...

Cloudflare Workers + Vite: Bindings

Source evidence: /Sources/honojs__hono/provenance.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-typegen
yarn cf-typegen
pnpm run cf-typegen
bun 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>)
})

Metadata

{
  "chunk_index": 0,
  "citation": "https://hono.dev/llms-full.txt#bindings",
  "coverage_role": "overview",
  "qualified_title": "Hono / llms-full / Cloudflare Workers + Vite > Bindings",
  "retrieved_at": "2026-07-02T05:51:01Z",
  "section_index": 501,
  "source_id": "/honojs/hono",
  "source_type": "llms_full",
  "target_label": "llms-full",
  "title": "Cloudflare Workers + Vite: Bindings",
  "upstream_url": "https://hono.dev/llms-full.txt",
  "version": "2026"
}
Kinic Wiki
Loading knowledge node
Details

Identity

database
db_23dhmsxlhukv
database_id
db_23dhmsxlhukv
path
/Knowledge/sources/honojs__hono/llms-full/cloudflare-workers-vite-bindings--092767153bdd.md
kind
directory
role
markdown_note
children
0

Metadata

created_at
virtual
updated_at
virtual
etag
virtual
metadata_json
{}

Lint Hints

No lightweight warnings.

Outgoing Links

No outgoing links indexed.

Incoming Links

Select a file node to inspect backlinks.

Raw Source

No raw source path inferred.