Dan
Dan
Explore posts from servers
CDCloudflare Developers
Created by Dan on 12/12/2023 in #workers-help
Global vars
Hello, I'm trying to find the most convenient approach to pass keys into internal clients and other env values previously provided via process.env.NAME. I stumbled across this mention in docs: https://developers.cloudflare.com/workers/wrangler/environments/#:~:text=Any%20defined%20environment%20variables%20(the%20vars%20key)%20are%20exposed%20as%20global%20variables%20to%20your%20Worker. Does it work? Variables specified in wrangler.toml are accessible via env.NAME param but they don't seem globally accessible as the snippet in the docs.
6 replies