RentCar Node is the backend service responsible to serve all rentCar front-end applications
- Node >= v14.x
- npm or yarn
- Docker
- Install the dependencies
yarn
- Setup your dev environment running docker-compose
docker-compose up -d
- Run all migrations
yarn typeorm migration:run
- Start the application
yarn dev
The unit tests were written uning jest, while the integration tests were simulated using supertest
To execute all tests, just run
yarn test
After push any commit into main branch, the CI/CD flow will be initialized through a github action.
The flow folow these steps:
- Checkout
- Build
- Transfer files for the Virtual Machine where it will be deployed
- Install dependencies in the virtual machine
- Deploy the application
In order to create new migrations, run the following command:
yarn typeorm migration:create -n <MIGRATON_NAME>
To execute migrations in your local database, run:
yarn typeorm migration:run