n00b Q: next-on-pages + D1 binding
i have seen some conversations and examples on discord, but still running into some mistakes,
- if i try to access a d1 binding using the suggested dev approach (watch build +
wrangler pages dev), i am able to access the d1 instance (the instance is not undefined and the
command shows a binding to the d1 db created from the gui), but not view the table (e.g., wrangler crashes saying table does not exist, but i can confirm it exists by using the CLI), i think i am misunderstanding howdevwrangler pageslinks to the d1 db, i.e., does the dev command create a local one or is there a flag to pass? - when using the
npm run dev- cf-proxy workflow, i am able to access kv, but not d1, e.g., it returns undefined when wrapping it:
binding(process.env.db),
- cf-proxy workflow, i am able to access kv, but not d1, e.g., it returns undefined when wrapping it: