/Knowledge/sources/honojs__hono/llms-full/adapter-helper-env--a54079299f51.md
Adapter Helper: env() - hono-docs
Adapter Helper: env() Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt env Summary The env() function f...
Adapter Helper: env()
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#env
Summary
The env() function facilitates retrieving environment variables across different runtimes, extending beyond just Cloudflare Workers' Bindings. The value that can be retrieved with env(c) may be different for each runtime. ```ts impor...
Content
The env() function facilitates retrieving environment variables across different runtimes, extending beyond just Cloudflare Workers' Bindings. The value that can be retrieved with env(c) may be different for each runtime.
import { env } from 'hono/adapter'
app.get('/env', (c) => {
// NAME is process.env.NAME on Node.js or Bun
// NAME is the value written in `wrangler.toml` on Cloudflare
const { NAME } = env<{ NAME: string }>(c)
return c.text(NAME)
})
Supported Runtimes, Serverless Platforms and Cloud Services:
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#env",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Adapter Helper > `env()` (1)",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 686,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Adapter Helper: env()",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}