Sample of Prisma engine running in cloudflare workers and behaving similarly to prisma-accelerate.
Prisma's Adapter calls unnecessary util and needs to be addressed.
- src/polyfills/util.ts
export * from 'node:util';
- tsconfig.json
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"util": ["src/polyfills/util"]
}
}
}
wrangler.toml
minify = true
compatibility_flags = [ "nodejs_compat" ]
[[kv_namespaces]]
binding = "KV"
id = "xxxxxx"
[vars]
SECRET = "**********"
npx prisma-accelerate-local -s SECRET -m DB_URL
npx prisma-accelerate-local -s abc -m postgres://postgres:xxxx@db.example.com:5432/postgres?schema=public
DATABASE_URL="prisma://xxxx.workers.dev/?api_key=xxx"