SvelteKit, Cloudflare Pages, Cloudflare D1, OpenAI gpt-4o-mini
- Create a new Cloudflare D1 database
npx wrangler d1 import <database_name> --remote ./database.sql
npx wrangler d1 import <database_name> --local ./database.sql
- npm run dev
- on Cloudflare Pages, deploy new app
- Framework Preset -> SvelteKit
- Use Connect Git instead of manual upload
- the first deployment will fail, you need to update production ENV with encrypted value (this is CF Pages bug)