/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-use-bindings-in-you-97a8a56302fb-use-bindings-in-your-application-s0475-c0000.md
Use Bindings in your application - hono-docs
Use Bindings in your application Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt use bindings in...
Use Bindings in your application
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#use-bindings-in-your-application
Summary
Use Variable and KV in your application. Set the types. ts type Bindings = { MY_NAME: string MY_KV: KVNamespace } const app = new Hono () Use them: ```tsx app.get('/', async (c) => { await c.env.MYKV.put('name', c.env.MYNAME) co...
Content
Use Variable and KV in your application. Set the types.
type Bindings = {
MY_NAME: string
MY_KV: KVNamespace
}
const app = new Hono<{ Bindings: Bindings }>()Use them:
app.get('/', async (c) => {
await c.env.MY_KV.put('name', c.env.MY_NAME)
const name = await c.env.MY_KV.get('name')
return c.render(<h1>Hello! {name}</h1>)
})