Sylphritz
Sylphritz
Explore posts from servers
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?
I tried running wrangler pages dev --proxy [nuxt dev server port] -- pnpm dev but the context.cloudflare and process.env.[DB_BINDING] don't seem to exist when I try to access them in defineEventHandler(). I read the documentation but I'm still not clear on how exactly to approach this. Any guidance or examples would be appreciated. My wrangler.toml has [[d1_databases]] and everything and I'm logged in.
27 replies