/MeliCart

Primary LanguageTypeScript

MeliControlMicroServices

MeliControl MicroServices

Installation

npm install

Build Development Containers Services (Docker)

⚠️WARNING: Need to install Docker and Docker Compose before execute the command below

This part builds all the containers of the services using Docker Compose configuration set on submodule updated earlier.

npm run build:services

Start Development Containers Services (Docker)

⚠️WARNING: Need to execute the command above (build) before start the containers services.

npm run start:services

Start Single Development Container Service (Docker)

npm run start:service:[Service]

Stop Single Development Container Service (Docker)

npm run stop:service:[Service]

Prisma

To migrate database

npm run prisma:migrate

To generate database

npm run prisma:generate

Microservices

Build Microservices

npm run build:microservices

Build Single Microservice

nest build [Microservice]

Start All Microservices with PM2

npm run start

Start Specific Microservice(s) with PM2

pm2 start ecosystem.microservices.config.js --only=[Microservice]

Stop All Microservices Execution in PM2

pm2 stop all

Stop Specific Microservice(s) Execution in PM2

pm2 stop [Microservice] | [Process ID]

Watch All Microservices Logs in PM2

pm2 logs

Watch Specific Microservice Logs in PM2

pm2 logs [Microservice]

Start Development

nest start [Microservice]

Start Development in Watch Mode

⚠️WARNING: Running the project in watch mode is memory expensive, take care.

nest start [Microservice] --watch

Run Eslint and Prettier to format and fix the code

npm run lint:format

Docker

To build meli-api docker image

docker compose build meli-api

To build cart docker image

docker compose build meli-cart

To build and execute cart docker image

docker compose up -d meli-cart --build

Docs

Swagger API

$ http://localhost:[PORT]/api/docs