Got it. I see that your UserController
is using message patterns instead of traditional HTTP methods for handling requests. Let's update the README.md to reflect this:
This project is a microservice application built with NestJS that provides a message-based API for managing user data. It utilizes MongoDB for data storage and RabbitMQ for message queuing.
- Node.js and npm installed on your machine
- Docker and Docker Compose installed (optional, for running with Docker)
- Clone this repository to your local machine.
- Install dependencies using npm:
npm install
- Start the development server:
npm run start:dev
- Clone this repository to your local machine.
- Navigate to the project directory.
- Run the following command to start the application using Docker Compose:
docker-compose up --build
This microservice application uses message patterns for communication between clients and the server. Below are the available message patterns and their corresponding endpoints:
- createUser: Create a new user.
- findAllUser: Retrieve a list of all users.
- findOneUser: Retrieve a user by ID.
- findOneByEmail: Retrieve a user by email.
- findOneByUsername: Retrieve a user by username.
- updateUser: Update an existing user.
- removeUser: Delete a user.
This application utilizes various algorithms and scenarios for user management, including:
- Password Hashing: User passwords are hashed using the bcrypt algorithm to securely store them in the database.
- Validation: Request data is validated using class-validator to ensure data integrity and consistency.
- Message Queuing: RabbitMQ is used for asynchronous communication between microservices, allowing for scalable and decoupled architecture.