bllchmbrs
CDCloudflare Developers
•Created by Sylphritz on 9/19/2023 in #pages-help
Is there a way to connect to D1 locally in, say, a Nuxt.js app in dev mode?
It's at least a little odd. It just ends up as deployment by prayer and it feels strange. One workaround I'm thinking of is that I can develop workers in one place then copy and paste the files into server and test on the staging branch but I'm not sure.
27 replies
CDCloudflare Developers
•Created by Sylphritz on 9/19/2023 in #pages-help
Is there a way to connect to D1 locally in, say, a Nuxt.js app in dev mode?
Basically how do I get wrangler to ACTUALLY make worker context (e.g., R2, KV) available to nuxt locally.
27 replies
CDCloudflare Developers
•Created by Sylphritz on 9/19/2023 in #pages-help
Is there a way to connect to D1 locally in, say, a Nuxt.js app in dev mode?
Here's my situation. I think this should be simple.
Situation
I have a vanilla nuxt app. I want my server routes to have access to KV.
I run:
npx wrangler pages dev --kv=LINK_STORE -- npm run dev
Doesn't work, cloudflare context doesn't show up: Cannot read properties of undefined (reading 'env')
I deploy it.
Endpoint works fine.
How do I get the local version running correctly
Do I run npm run build
and then npx wrangler pages dev dist --kv=LINK_STORE
For some reason, that doesn't startup nuxt / the site.
Could someone tell me what I'm doing wrong?27 replies
CDCloudflare Developers
•Created by Sylphritz on 9/19/2023 in #pages-help
Is there a way to connect to D1 locally in, say, a Nuxt.js app in dev mode?
Quick question, are you trying to use a cloudflare binding to access things, and that's what doesn't work locally? I am trying to do the same thing and pulling my hair out doing so.
27 replies
CDCloudflare Developers
•Created by bllchmbrs on 8/1/2023 in #pages-help
Custom Domain failing for cloudflare pages
@erisachu , last comment - thank you!!!!
39 replies
CDCloudflare Developers
•Created by bllchmbrs on 8/1/2023 in #pages-help
Custom Domain failing for cloudflare pages
(It was my router's)
39 replies
CDCloudflare Developers
•Created by bllchmbrs on 8/1/2023 in #pages-help
Custom Domain failing for cloudflare pages
Thanks!
39 replies
CDCloudflare Developers
•Created by bllchmbrs on 8/1/2023 in #pages-help
Custom Domain failing for cloudflare pages
ok, switched it to 8.8.8.8 and it works fine now.
39 replies
CDCloudflare Developers
•Created by bllchmbrs on 8/1/2023 in #pages-help
Custom Domain failing for cloudflare pages
I have not modified it at all, so whatever is the expected default. I believe it is my personal router.
39 replies
CDCloudflare Developers
•Created by bllchmbrs on 8/1/2023 in #pages-help
Custom Domain failing for cloudflare pages
I have run:
Is there something else I should run? Should I restart?
39 replies
CDCloudflare Developers
•Created by bllchmbrs on 8/1/2023 in #pages-help
Custom Domain failing for cloudflare pages
ACK, will do that now. Here is the result from the curl:
39 replies
CDCloudflare Developers
•Created by bllchmbrs on 8/1/2023 in #pages-help
Custom Domain failing for cloudflare pages
That's what cloudflares pages custom domain created, I haven't changed those settings.
39 replies
CDCloudflare Developers
•Created by bllchmbrs on 8/1/2023 in #pages-help
Custom Domain failing for cloudflare pages
39 replies
CDCloudflare Developers
•Created by bllchmbrs on 8/1/2023 in #pages-help
Custom Domain failing for cloudflare pages
Running that
39 replies