- Prepare the environment, clone this repo
git clone https://github.com/snapcook/server.git- Install project dependencies
npm installNotes:
- Skip part no. 3 & 4 if you already have PostgreSQL setup in your computer
- Or, if you prefer use Cloud SQL instance to store your data its fine
- Setup docker
docker compose up -d- Check docker is running
docker ps- Run this. Whenever you make changes to your database that are reflected in the Prisma schema, you need to manually re-generate Prisma Client to update the generated code in the
node_modules/.prisma/clientdirectory and update themigration:
npx prisma generatenpx prisma migrate dev- Run seed
npm run seed- Run the project
npm run dev