Wow thank you for this fast answer 😊

Wow thank you for this fast answer 😊
9 Replies
serrf
serrfβ€’2y ago
Actually, the fix you mentioned is for a Page issue, and I'm using Workers so I already have my wrangler.toml file containing the { binding = "MAIN_DB", database_id = "<ignored>", database_name = "db_name" }; this is not a workaround for workers, it is the way it should work (doc: https://developers.cloudflare.com/d1/get-started/#4-bind-your-worker-to-your-d1-database) Anyone achieved to use a D1 instance locally, on some real web app (Next|Remix) inside a worker using wrangler dev --local --persist?
Get started Β· Cloudflare D1 docs
Documentation for Cloudflare D1, a SQL database.
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
serrf
serrfβ€’2y ago
GitHub
πŸ› BUG: ReferenceError when using D1 locally Β· Issue #2253 Β· cloudfl...
What version of Wrangler are you using? 2.4.2 What operating system are you using? Mac Describe the Bug I have a Remix app in a worker and D1 binding appears as undefined (in local). Other bindings...
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
serrf
serrfβ€’2y ago
Yes I guess I’ll do that. Just need to check if service binding can be done on page (which I know nothing about) No problem πŸ˜‰
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
serrf
serrfβ€’2y ago
Nice thank you @tomsherman By any chance, do you know if Page service is as flexible as Worker service? Can I use the wrangler.toml all alone to describe my resources and deploy?
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
serrf
serrfβ€’2y ago
Haha ok, I'll just use neon.tech or supabase for the DB right now; then I'll migrate to D1.
Want results from more Discord servers?
Add your server