A simple backend REST API for a blog built using NestJS, Prisma, PostgreSQL and Swagger.
- Install dependencies:
npm install
- Start a PostgreSQL database with docker using:
docker-compose up -d
.- If you have a local instance of PostgreSQL running, you can skip this step. In this case, you will need to change the
DATABASE_URL
inside the.env
file with a valid PostgreSQL connection string for your database.
- If you have a local instance of PostgreSQL running, you can skip this step. In this case, you will need to change the
- Apply database migrations:
npx prisma migrate dev
- Start the project:
npm run start:dev
- Access the project at http://localhost:3000/api