Setting Up the Project Locally for Developement
Follow these steps to set up the project on your local machine:
Prerequisites
- Node.js (>=18)
- Docker and Docker Compose
Steps
-
Clone the Repository:
git clone https://github.com/Sidd-77/microservices-chat.git cd microservices-chat
-
Install Dependencies: Install all dependencies in the root and subdirectories:
npm install
-
Run Setup Script: Execute the setup script to configure the environment:
node setup.js
-
Build Project: Build the services and models needed:
npm run build
-
Start Dependencies Locally: Use Docker Compose to start dependencies like Redis, RabbitMQ, MongoDB and MinIO:
docker-compose -f docker-compose-dependencies.yml up -d
-
Run the Application: Start the application using npm:
npm run dev
Note for Notification Service: To enable the push-notification service, generate a VAPID key pair and place it in the environment files of both the
web
andnotification-service
directories.