i feel stupid lol, what do I configure environment variable for dev environment under `wrangler.toml

help pls
2 Replies
hollycat
hollycat2w ago
As per documentation: For local development with wrangler dev, variables in wrangler.toml are automatically overridden by any values defined in a .dev.vars file located in the root directory of your worker. This is useful for providing values you do not want to check in to source control. Terminal window API_HOST = "localhost:4000" API_ACCOUNT_ID = "local_example_user" Alternatively, you can specify per-environment values in wrangler.toml and provide an environment value via the env flag when developing locally like so wrangler dev --env=local. https://developers.cloudflare.com/workers/configuration/environment-variables/
Cloudflare Docs
Environment variables | Cloudflare Workers docs
Environment variables are a type of binding that allow you to attach text strings or JSON values to your Worker
0x146231489231923
i found out my problem if you just define the variable in wrangler.toml but not including it in .dev.vars file, it wont be configured into the workers deployment
Want results from more Discord servers?
Add your server