A working example of microservice architecture implementation using nestjs framework
This example is basically an API for some task manager application. It provides a possibility to perform sign up users, confirm user's emails, manage user's tasks.
Execute docker network create infrastructure && cp .env.example .env && docker-compose up -d
from the root of the repository
sudo vim /etc/hosts
and add line 127.0.0.1 db
to it. This is a temporary step, it will not be required since new update.cp .env.example .env && cp .env.test.example .env.test
docker-compose -f ./docker-compose.test.yml up -d
from the root of the repositorycd ./gateway && npm install && npm run test
from the root of this repoThis API showcase consists of the following parts:
This example uses a SINGLE database (MongoDB) instance for all microservices. This is not a correct point, the correct way is to use a separate DB instance for every microservice. I used one DB instance for all microservices to simplify this example.