A template to get you up and building a dashboard in Remix that runs solely on Cloudflare.
You can apply migrations to your development database by running:
npx prisma migrate dev
Start the Remix development asset server and Wrangler by running:
npm run dev
This starts your app in development mode.
Create a database:
wrangler d1 create remix-dashboard-d1-example-db
Apply migrations:
wrangler d1 migrations apply remix-dashboard-d1-example-db
Build and deploy:
npm run build && npx wrangler publish
Configure a GitHub Actions secrets of CF_API_TOKEN
with the normal worker deployment permissions + the new D1 write permissions to be able to apply migrations on deployment.
To trigger a deployment:
- Navigate to the "Actions" tab of your GitHub repository
- Select the "Deploy" action
- Use the dropdown labeled "Run Workflow" to select a branch and start the deployment
- Remix Docs
- CF D1
- Prisma Docs (only used for generating migrations)