This repository contains implemented functionalities that can be reused and extended as required.
- NestJs, the progressive Node.js framework for building server-side applications.
- Postgresql, Relational database.
- NPM as package manager.
- Docker, a solution for building,sharing and running application images.
In order to run this project and extend its functionalities you need to follow some few steps :
- Make sure that Node.js (>= 10.13.0, except for v13) is installed on your operating system. ( Download Here)
- NestJs CLI (Command Line Interface)
npm i -g @nestjs/cli
- make sure you have docker installed.
- pull the image :
docker pull mehdibc/todo-app
- run the following docker run command:
docker pull mehdibc/todo-app
sudo docker run -d -p 3000:3000 --name todo-app mehdibc/todo-app
- you can run all the tests at once using
npm run test
or select the file test
npm run test -- testfile.spec.ts
Unit test and integration test scripts are under every module (user | task) under tests directory
We need to run the application before the end to end testing
npm run cypress:open
This acceptance test is done by the product owner to make sure that the solution works as expected.
Link: [a link] (https://github.com/MehdiBC/Todo-list-backend/blob/master/documentation/UAT.pdf)
The project pipeline code can be found under .github/workflows
and its structure is as follows
This part of the pipeline is deployment and depends on the packaging phase. The project is deployed on
an Amazon Ec2 instance.
It follows these steps:
1- Login to the instance via SSH.
2- Shut down the running container.
3- Pull the new released image.
4- Launch a new container via docker run
command with port and name of the container specification.
In order to access the site a security groups must be added with TCP on PORT 80.