x# Remix + Cloudflare Workers + Prisma!
Before starting, make sure you have the following:
node >= 16
- A Prisma Data Proxy account
- Followed Deploying to Cloudflare Workers documentation and did steps 2, 6 and 7
- A
.env
file withDATABASE_URL
that points to your prisma data proxy account
For more information, visit this
After that, run:
npm install
Edge functions cannot access files in the file system which prevents Prisma to load values from .env
, so it is necessary to set up a wrangler secret by using wrangler's CLI or the dashboard.
$ wrangler secret put DATABASE_URL
And finally, generate a new Prisma Client by running:
npm run generate-client
Check Prisma and Cloudflare for more information.
$ npm run dev
And then check http://127.0.0.1:8787
. You're ready 💇♂️
npm run deploy