How to connect to D1 remote with React
Hello everyone,
I create a React app by following: https://developers.cloudflare.com/workers/frameworks/framework-guides/react/
However, it starts the dev mode by using command
npm run dev instead of wrangler dev
The document https://developers.cloudflare.com/d1/best-practices/local-development/ said that we can use remote database by using command wrangler dev --remote
How can we connect to remote database when using React app?
Many thanksCloudflare Docs
React
Create a React application and deploy it to Cloudflare Workers with Workers Assets.
Cloudflare Docs
Local development
D1 has fully-featured support for local development, running the same version of D1 as Cloudflare runs globally. Local development uses Wrangler, the command-line interface for Workers, to manage local development sessions and state.
0 Replies