|
2 | 2 |
|
3 | 3 | ## Setting-up Matching Service
|
4 | 4 |
|
5 |
| -1. In the `matching-service` directory, create a copy of the `.env.sample` file and name it `.env`. |
| 5 | +1. In the `matching-service` directory, create a copy of the `.env.sample` file and name it `.env`. If you are looking to run matching service with the other services using docker-compose, comment out the variable `RABBITMQ_ADDR` under use case (1) in the .env file. Otherwise, if you are looking to run matching service individually, comment out the variables `RABBITMQ_DEFAULT_USER`, `RABBITMQ_DEFAULT_PASS` and `RABBITMQ_ADDR` under use case (2) in the .env file. |
6 | 6 |
|
7 |
| -## Running Matching Service without Docker |
| 7 | +2. If you are running matching service together with other services using docker-compose, to set up credentials for RabbitMq, update the RabbitMq variables in the `.env` file. Update `RABBITMQ_DEFAULT_USER` and `RABBITMQ_DEFAULT_PASS` to what you want, then update `RABBITMQ_ADDR` to be `amqp://<RABBITMQ_DEFAULT_USER>:<RABBITMQ_DEFAULT_PASS>@rabbitmq:5672`. |
| 8 | +You can access RabbitMq management user interface locally with the username in `RABBITMQ_DEFAULT_USER` and password in `RABBITMQ_DEFAULT_PASS` at http://localhost:15672. |
8 | 9 |
|
9 |
| -1. Follow the instructions [here](https://nodejs.org/en/download/package-manager) to set up Node v20. |
| 10 | +3. If you are running matching service individually, you do not need to make any changes to `RABBITMQ_ADDR`. You can access RabbitMq management user interface locally with the username `guest` and password `guest` at http://localhost:15672. |
10 | 11 |
|
11 |
| -2. Open Command Line/Terminal and navigate into the `matching-service` directory. |
| 12 | +## Running Matching Service Individually with Docker |
12 | 13 |
|
13 |
| -3. Run the command: `npm install`. This will install all the necessary dependencies. |
| 14 | +1. Set up and run RabbitMq locally on your computer with the command `docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:4.0-management`. |
14 | 15 |
|
15 |
| -4. Run the command `npm start` to start the Matching Service in production mode, or use `npm run dev` for development mode, which includes features like automatic server restart when you make code changes. |
| 16 | +2. Follow the instructions [here](https://nodejs.org/en/download/package-manager) to set up Node v20. |
| 17 | + |
| 18 | +3. Open Command Line/Terminal and navigate into the `matching-service` directory. |
| 19 | + |
| 20 | +4. Run the command: `npm install`. This will install all the necessary dependencies. |
| 21 | + |
| 22 | +5. Run the command `npm start` to start the Matching Service in production mode, or use `npm run dev` for development mode, which includes features like automatic server restart when you make code changes. |
16 | 23 |
|
17 | 24 | ## After running
|
18 | 25 |
|
|
0 commit comments