Welcome to the Microservices Template repository! This repository serves as a foundational setup for building microservices using Nest.js, NATS (NATS Streaming Server), and Docker. With this template, you can quickly create and deploy your own microservices architecture with ease.
- Nest.js: A progressive Node.js framework for building efficient, reliable, and scalable server-side applications.
- NATS: A lightweight and high-performance messaging system for inter-service communication, enabling seamless communication between microservices.
- Docker: Containerization technology to ensure consistency and portability across different environments.
- Clone the repository:
git clone https://github.com/SourceSenseiTheRealOne/nest-nats-microservices-example
- Navigate to the project directory:
cd nest-nats-microservices-example
- Start the microservices:
docker-compose up --build
The repository structure is organized as follows:
- api-gateway: Contains the API Gateway service built with Nest.js, responsible for routing requests to the appropriate microservices.
- users-microservice: Contains the Users Microservice built with Nest.js, handling user-related functionality.
- payments-microservice: Contains the Payments Microservice built with Nest.js, managing payment processing.
- docker-compose.yml: Defines the Docker services for running the microservices and NATS.
The microservices communicate with each other using NATS messaging system. NATS ensures reliable and efficient communication between services, enabling seamless integration and scalability.
Contributions are welcome! If you have any suggestions, enhancements, or bug fixes, feel free to open an issue or submit a pull request.
Swagger
This project is licensed under the MIT License.