This example uses Cloudflare D1 and deploys to Cloudflare Workers
Cloudflare bindings in wrangler.toml
are mapped in src/env/cloudflare.ts
and imported in src/root.tsx
.
rm .mf/d1/db.sqlite3
touch .mf/d1/db.sqlite3
sqlite3 .mf/d1/db.sqlite3 < migrations/**.sql
pnpm run dev
Create the D1 database and update wrangler.toml
Note that miniflare's D1 support is still in beta, so the binding name needs to be prefixed with __D1_BETA__
when running this application locally.
pnpm exec wrangler d1 create solid-start-cloudflare-example-db
Run migrations
pnpm exec wrangler d1 migrations apply solid-start-cloudflare-example-db
Publish
pnpm run publish