A NestJS-based server-side application.
Install dependencies:
yarn installBefore running the project, create a .env file in the root directory:
cp .env.example .envThen edit .env and set your actual secrets and database info:
DATABASE_URL="postgresql://<POSTGRES_USER>:<POSTGRES_PASSWORD>@localhost:5434/<POSTGRES_DB>?schema=public"
JWT_SECRET="<your-secret>"Update your docker-compose.yml file with the database credentials you set in .env:
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}- Docker and Docker Compose installed
- Prisma CLI installed or accessible via npm scripts
Start the database container:
yarn db:dev:upApply Prisma migrations after the database container is running:
yarn prisma:dev:deployReset the database container and apply migrations:
yarn db:dev:restartyarn start:devcurl -X POST http://localhost:3000/auth/signup \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]", "password":"123456"}'curl -X POST http://localhost:3000/auth/signin \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]", "password":"123456"}'