-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Open
Labels
content:editRequest for content editsRequest for content editsdocumentationDocumentation editsDocumentation editsproduct:workersRelated to Workers productRelated to Workers product
Description
Existing documentation URL(s)
https://developers.cloudflare.com/workers/wrangler/environments/#staging-and-production-environments
What changes are you suggesting?
Currently it says:
Any defined environment variables (the vars key) are exposed as global variables to your Worker.
With this configuration, the ENVIRONMENT variable can be used to call specific code depending on the given environment:
if (ENVIRONMENT === "staging") {
// staging-specific code
} else if (ENVIRONMENT === "production") {
// production-specific code
}But the ENVIRONMENT variable is available via env.ENVIRONMENT.
Need to update the wrong statement and the code example.
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
content:editRequest for content editsRequest for content editsdocumentationDocumentation editsDocumentation editsproduct:workersRelated to Workers productRelated to Workers product