/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"
}
Kinic Wiki
Loading knowledge node
Details

Identity

database
db_23dhmsxlhukv
database_id
db_23dhmsxlhukv
path
/Knowledge/sources/honojs__hono/llms-full/adapter-helper-env--a54079299f51.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.