Skip to content

Latest commit

 

History

History
68 lines (45 loc) · 832 Bytes

README.md

File metadata and controls

68 lines (45 loc) · 832 Bytes

Dive Workshop

Local setup

  1. Install dependencies
npm install
  1. Start Postgres (Docker)

create a .env file with DATABASE_URL=postgresql://postgres:postgres@localhost:5432/dive

docker compose up -d
  1. Run Prisma migrations + generate client
npx prisma migrate dev
npx prisma generate
  1. Seed the database
npm run prisma:seed
  1. Start the dev server
npm run dev

App runs at http://localhost:3000.

Prisma workflow (day-to-day)

  • Edit schema: prisma/schema.prisma
  • Apply changes locally:
npx prisma migrate dev --name <change-name>
npx prisma generate
  • Reset local DB (destructive):
npx prisma migrate reset

Useful commands

  • Prisma Studio:
npx prisma studio
  • Run tests:
npm run test