@@ -47,54 +47,54 @@ To start the server, run the following command:
47
47
go run main.go
48
48
```
49
49
50
- The server will be available at http://localhost:8082 .
50
+ ### Setting up message queue with RabbitMQ
51
51
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.
53
53
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 :
55
55
56
56
``` bash
57
- docker build -t history-service .
57
+ docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
58
58
```
59
59
60
+ 2 . Then we can run the history-service:
61
+
60
62
``` bash
61
- docker run -p 8082:8082 -d history-service
63
+ go run main.go
62
64
```
63
65
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:
72
67
73
68
``` bash
69
+ cd ../execution-service
74
70
go run main.go
75
71
```
76
72
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.
78
74
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 .
80
76
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:
82
80
83
81
``` bash
84
- docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
82
+ docker build -t history-service .
85
83
```
86
84
87
- 2 . Then we can run the history-service:
88
-
89
85
``` bash
90
- go run main.go
86
+ docker run -p 8082:8082 -d history-service
91
87
```
92
88
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} `
94
97
95
98
``` bash
96
- cd ../execution-service
97
99
go run main.go
98
100
```
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