supabase init-
Add local db connection strings to
.env -
Install dependencies (Node version 20.x):
npm installnpx @snaplet/snapshot setup- Add project to Vercel for production use.
Start the development server on http://localhost:3000:
npm run devThis will start the local supabase db and run the Nuxt app.
Build local db using snapshot of production db:
npm run db:buildRemove all cached snapshots and rebuild local db:
npm run db:resetGenerate a migration script and migrate the local db based on schema.prisma changes:
npm run db:applyBefore merging your local db changes:
- Use
npm run buildas the build command wherever you're deploying (e.g. Vercel) - Set production environment variables for database connection strings
When this app is built for production, Prisma Migrate will apply new migrations to the production database automatically.