How can I access my d1 database in next on pages edge LOCALLY?
I have it working fine during deployment and build, but I can't seem to access it locally and there are no docs on it.
7 Replies
http://localhost:8788/
returns 404 on npx wrangler pages dev
if I run next dev
in another terminal it cant access the d1 database

Have you already update next config with
setupDevPlatform
?
https://developers.cloudflare.com/pages/framework-guides/nextjs/ssr/get-started/#3-update-nextconfigmjsCloudflare Docs
Get started | Cloudflare Pages docs
Deploy a full-stack Next.js app to Cloudflare Pages
yes
Have you created the tables/seeded the local database?
Guess easier you share your wrangler.toml on how you define your D1 binding
NEXTRA