You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question:
I’m setting up a Cloudflare Worker with D1 for team development. Each developer will have their own Cloudflare account to deploy/test independently.
Goal:
Developers should override local D1 configs (DB name, ID, etc.) via environment variables (e.g., .dev.vars).
Avoid hardcoding values in wrangler.toml.
For example, something like this in wragler.toml
[env.local]
name = "" # read from env based on the dev config
[[env.local.d1_databases]]
binding = "DB"
database_name = "" # read from env based on the dev confg
database_id = "" # read from env based on the dev confg
Is there any way to achieve this or any other alternatives?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Question:
I’m setting up a Cloudflare Worker with D1 for team development. Each developer will have their own Cloudflare account to deploy/test independently.
Goal:
Developers should override local D1 configs (DB name, ID, etc.) via environment variables (e.g., .dev.vars).
Avoid hardcoding values in wrangler.toml.
Is there any way to achieve this or any other alternatives?
Beta Was this translation helpful? Give feedback.
All reactions