This is a study project using the express and mongoose libraries, it aims to learn more about creating RESTFULL API's and about non-relational databases, it also serves to learn how to assemble a CI/CD pipeline using github Actions
- Node.js v16.13.0
- Typescript v4.4.4
- MongoDB
Endpoints /v1
:
- GET
/items
- GET
/items/:id
- POST
/items
- PUT
/items/:id
- DELETE
items/:id
- GET
/users/:id
- POST
/users
- POST
/users/authenticate
- DELETE
/users/:id
- GET
/roles
- GET
/roles/:id
- POST
/roles
- PUT
/roles/:id
- DELETE
/roles/:id
To create a docker image of this app just run the follow command
docker build . -t express-mongoose-study &&
docker run -p 3002:3002 express-mongoose-study
The application will respond on port 3002, to test if it went up correctly, just access health endpoint
npm install &&
docker-compose up mongoDB &&
npm run start:dev
npm install &&
npm run test
The results can be seen in coverage/index.html
npm install &&
docker-compose up sonarqube &&
npm run sonar
The results can be seen in localhost:9000