Using Cloudflare services like D1 without bindings in a worker
I'm trying to dynamically create D1 databases and make them accessible through a worker. Still, each database requires a manual binding to be added either in the settings or
wrangler.toml
file. Is there a way to dynamically access any D1 database in the same account as my worker without the binding?
The closest solution I have found is using Cloudflare's API to interact with the database but it's about 8x slower than using it from a worker.4 Replies
Not yet, unfortunately. There has been talk about it, so it might be released in the future
I see, thanks!
do we have any workaround for this temporarily? until you roll out the feature.
@HardlyWorkin' Is there a limit on the number of D1 bindings per worker? I plan to use each D1 database for a tenant. As a temporary workaround, I will add this to wrangle.toml for automatic deployment. Will this cause binding limits in the future? I noticed we can patch bindings with Cloudflare for platforms. Should I use worker for platform to assign each customer their own bindings?
Please don’t resurrect old threads. If you have a question, create a new thread