An open API service indexing awesome lists of open source software.

https://github.com/yagoluiz/product-microservices

Comunication microservices using gRPC and NodeJS
https://github.com/yagoluiz/product-microservices

docker docker-compose grpc microservice nodejs

Last synced: about 1 month ago
JSON representation

Comunication microservices using gRPC and NodeJS

Awesome Lists containing this project

README

        

# Product - Microservices

![](https://github.com/yagoluiz/product-microservices/workflows/Docker%20Image%20CI/badge.svg)

Microservice responsible for listing discounted products via gRPC [discount microservice](https://github.com/yagoluiz/discount-microservices).

## Data information

Data is stored in Postgres database. The scripts for table generation and initial data are present in the **sql folder**.

## Instructions for run project

For run project and integration testing, the database and discount service must be run.

### npm/nodemon

* Run application:

`npm start`

or

`nodemon .\bin\server.js`

* Test application:

`npm test`

### Container

* Docker:

`docker build -t product-microservices .`

Run project [discount microservice](https://github.com/yagoluiz/discount-microservices):

`docker build -t discount-microservices .`

* Docker compose:

`docker-compose up -d .`

### Endpoint

*http://localhost:3000/api/v1/products* **(GET)**