This is an Express CRUD API built with Mongoose and incorporates a significant amount of abstraction. One of the aspects that brings me the most satisfaction is the project's highly scalable nature, achieved through the abstraction implemented in all layers.
In addition to the implementation, I have developed comprehensive unit tests using Chai, Jest, and Sinon specifically for the service layer of the API. These tests ensure the reliability and correctness of the functionality.
To enhance the project's deployment and ease of use, I have also utilized Docker. This allows for seamless setup and configuration to achieve the desired functionality and performance.
I am thrilled with the outcomes of this project and the valuable skills I have acquired throughout its development.
Install this project using docker
docker-compose up -d
cars
and motorcycles
work interchangeably.
GET /cars
GET /cars/${id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of car to fetch |
POST /cars
Your request body should look like this for cars:
{
"model": "Marea",
"year": 2002,
"color": "Black",
"status": true,
"buyValue": 15.990,
"doorsQty": 4,
"seatsQty": 5
}
PUT /cars/:id
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of car to update |
The body of this PUT should look like the POST body.
If you would like any help executing it or if you have any suggestion on how to improve this code, please reach me out!
+55 24 99243-3741