rentit
Rentit is a car rental API written in NodeJS with NestJS.
Tech Stack
- NodeJS
- Typescript
- NestJS
- Jest
- Prisma
- PostgreSQL
Run Locally
Clone the project
git clone https://github.com/PatrickMazzuco/rentit.git
Go to the project directory
cd rentit
Create the .env file.
cp .env.example .env.development.local
Run the development database with docker
docker-compose up -d
Install the dependencies
pnpm install
Run migrations
pnpm migration:run:dev
Run the project with
pnpm start:dev
Run tests
Run the test database with docker
Create the test .env file, change the database name to rentit_tests and the database port to 54320.
cp .env.example .env.test.local
Run the test database with docker
docker-compose up -d -f docker-compose.test.yml
Install the dependencies
pnpm install
Run migrations
pnpm migration:run:dev
Run the tests with
# Unit tests
pnpm test:unit
# Integration tests
pnpm test:int
# All tests
pnpm test