- make sure to have
pnpminstalled globally (npm i -g pnpm) - run
pnpm install -r - run
pnpm run prisma:generate
To update dependencies:
- run
pnpm up -r --latest
To launch the dev environment, use docker - docker compose up.
Make sure to have an up to date .env file in the root of your repository.
The repository follows conventional commits which are enforced using CommitLint (executed via husky on commit).
pnpm run test - run tests.
pnpm run lint - lint with auto fix using ESLint.
pnpm run check - lint with only check using ESLint.
pnpm run format - format all supported files using prettier.
pnpm run dev - run the backend locally.
Start by running the container for the DB locally with:
docker compose up db --detachThen export the env variables for the DB connection:
export DATABASE_URL=postgresql://hidemeplease:hidemeplease@0.0.0.0:5432/hidemepleaseAnd now execute the migration commands:
pnpm run prisma:migrate:devFollowed by:
pnpm run prisma:generateCreate empty migration
prisma migrate dev --create-only --name <NAME_OF_YOUR_MIGRATION>Print db diff
npx prisma migrate diff --from-schema-datamodel ./prisma/schema.prisma --to-url postgresql://hidemeplease:hidemeplease@localhost:5432/hidemeplease --script
Mark migration as applied
npx prisma migrate resolve --applied <NAME_OF_YOUR_MIGRATION>