Skip to content

Commit 5acfa89

Browse files
committed
Minor tweaks
1 parent 000d521 commit 5acfa89

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/content/changelog/workers/2025-03-14-importable-env.mdx renamed to src/content/changelog/workers/2025-03-17-importable-env.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: Import `env` for direct access to bindings in your Worker code
2+
title: Import `env` to access bindings in your Worker's global scope
33
description: More easily configure your Worker and call bindings from anywhere with an importable `env`
44
products:
55
- workers
6-
date: 2025-03-14T15:00:00Z
6+
date: 2025-03-17T15:00:00Z
77
---
88

99
import { Render, TypeScriptExample } from "~/components";

src/content/docs/workers/runtime-apis/bindings/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ Bindings are located on the `env` object, which can be accessed in several ways:
106106
console.log(`Hi, ${this.env.Name}`);
107107
```
108108

109-
### Importing `env`
109+
### Importing `env` as a global
110110

111111
Importing `env` from `cloudflare:workers` is useful when you need to access a binding
112112
such as [secrets](/workers/configuration/secrets/) or [environment variables](/workers/configuration/environment-variables/)
113-
to do initial Worker configuration.
113+
in top-level global scope. For example, to initialize an API client:
114114

115115
```js
116116
import { env } from "cloudflare:workers";

0 commit comments

Comments
 (0)