@@ -47,54 +47,54 @@ To start the server, run the following command:
4747go run main.go
4848```
4949
50- The server will be available at http://localhost:8082 .
50+ ### Setting up message queue with RabbitMQ
5151
52- ## Running the Application via Docker
52+ A message queue is used to pass submission results asynchronously from the execution-service to the history-service.
5353
54- To run the application via Docker, run the following command:
54+ 1 . In order to do so, we can run the following command to set up a docker container for RabbitMQ :
5555
5656``` bash
57- docker build -t history-service .
57+ docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
5858```
5959
60+ 2 . Then we can run the history-service:
61+
6062``` bash
61- docker run -p 8082:8082 -d history-service
63+ go run main.go
6264```
6365
64- The server will be available at http://localhost:8082 .
65-
66- ## API Endpoints
67-
68- - ` POST /histories `
69- - ` GET /histories/{docRefId} `
70- - ` PUT /histories/{docRefId} `
71- - ` DELETE /histories/{docRefId} `
66+ 3 . We can run the execution-service by changing our directory and running the same command:
7267
7368``` bash
69+ cd ../execution-service
7470go run main.go
7571```
7672
77- ## Setting up message queue with RabbitMQ
73+ To view more details on the RabbitMQ queue, we can go to ` localhost:15672 ` , and login using ` guest ` as the username and password.
7874
79- A message queue is used to pass submission results asynchronously from the execution-service to the history-service .
75+ The server will be available at http://localhost:8082 .
8076
81- 1 . In order to do so, we can run the following command to set up a docker container for RabbitMQ:
77+ ### Running the Application via Docker
78+
79+ To run the application via Docker, run the following command:
8280
8381``` bash
84- docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
82+ docker build -t history-service .
8583```
8684
87- 2 . Then we can run the history-service:
88-
8985``` bash
90- go run main.go
86+ docker run -p 8082:8082 -d history-service
9187```
9288
93- 3 . We can run the execution-service by changing our directory and running the same command:
89+ The server will be available at http://localhost:8082 .
90+
91+ ## API Endpoints
92+
93+ - ` POST /histories `
94+ - ` GET /histories/{docRefId} `
95+ - ` PUT /histories/{docRefId} `
96+ - ` DELETE /histories/{docRefId} `
9497
9598``` bash
96- cd ../execution-service
9799go run main.go
98100```
99-
100- To view more details on the RabbitMQ queue, we can go to ` localhost:15672 ` , and login using ` guest ` as the username and password.
0 commit comments