Nestjs microservice use the gRPC transport layer.
Architecture with gRPC transport in this project
- Docker
- DockerDocker-Compose
- node:16-alpine3.16 (Image)
- nestjs
- @nestjs/microservices
- @grpc/grpc-js
- @grpc/proto-loader
- Api gateway
- Customer service
- Book service
Copy file .env.prod.example
to .env.prod
, and
In the Customer and Book service, copy file .env.example
to .env
$ docker-compose up -d
$ docker-compose down
Customer service: http://localhost:3000/customer <br>
1. GET: http://localhost:3000/customer
2. GET: http://localhost:3000/customer/{id}
3. POST: http://localhost:3000/customer
4. PUT: http://localhost:3000/customer/{id}
5. DELETE: http://localhost:3000/customer/{id}
Book service: http://localhost:3000/book <br>
1. GET: http://localhost:3000/book
2. GET: http://localhost:3000/book/{id}
3. POST: http://localhost:3000/book
4. PUT: http://localhost:3000/book/{id}
5. DELETE: http://localhost:3000/book/{id}