kgni
Explore posts from serversCDCloudflare Developers
•Created by kgni on 2/5/2024 in #workers-help
wrangler.toml config questions
3. how to sync staging and local
I want to keep my local and staging environment in sync when developing. Is it possible to dump the staging data? Does anyone have a suggestion how to obtain this in the best way?
So far my pipelines are going to run the migrations and deploy the workers depending on merge to staging or production branch, but I also want to be able to pull the staging environment into my local environment
To answer this 3rd question myself, I guess for now you can create a backup using of the desired environment using this and just seed from that locally?
reference: https://github.com/cloudflare/workers-sdk/issues/3891
3 replies
CDCloudflare Developers
•Created by kgni on 2/2/2024 in #d1-database
Hi there. Sorry in advance for the noob
Thank you!
8 replies
CDCloudflare Developers
•Created by kgni on 2/2/2024 in #d1-database
Hi there. Sorry in advance for the noob
When deploying, would the bindings then show up in the dashboard as well?
8 replies
CDCloudflare Developers
•Created by kgni on 2/2/2024 in #d1-database
Hi there. Sorry in advance for the noob
Cool, thank you for the quick response both of you!
8 replies
CDCloudflare Developers
•Created by kgni on 2/2/2024 in #d1-database
Hi there. Sorry in advance for the noob
If so, then the binding name is solely used as an environment variable (and not actually used as a reference to point to specific databases)
8 replies
CDCloudflare Developers
•Created by kgni on 2/2/2024 in #d1-database
Hi there. Sorry in advance for the noob
So the bindings in my example above [env.staging] and [env.production] can just be "DB" but then if the database_name and database_id are different they will point to different databases?
8 replies
CDCloudflare Developers
•Created by kgni on 2/2/2024 in #d1-database
Hi there. Sorry in advance for the noob
Here is my worker.ts file (using hono with trpc)
8 replies
CDCloudflare Developers
•Created by kgni on 2/2/2024 in #d1-database
Hi there. Sorry in advance for the noob
From the documentation it seems like the binding names also have to be unique.
Here is the example:
But then how would I access the different binding variables in my worker, depending on the environment, since they are now different
8 replies