Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tituschewxj committed Nov 6, 2024
1 parent 2b2bbd5 commit fac4430
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 50 deletions.
52 changes: 26 additions & 26 deletions apps/execution-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,32 @@ go run main.go

The server will be available at http://localhost:8083.

## Running the Application via Docker
### Setting up message queue with RabbitMQ

A message queue is used to pass submission results asynchronously from the execution-service to the history-service.

1. In order to do so, we can run the following command to set up a docker container for RabbitMQ:

```bash
docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
```

2. Then we can run the execution-service:

```bash
go run main.go
```

3. We can run the history-service by changing our directory and running the same command:

```bash
cd ../history-service
go run main.go
```

To view more details on the RabbitMQ queue, we can go to `localhost:15672`, and login using `guest` as the username and password.

### Running the Application via Docker

To run the application via Docker, run the following command:

Expand Down Expand Up @@ -215,28 +240,3 @@ If compilation error exists or any of the tests (visible and hidden) fails, stat
"status": "Attempted"
}
```

## Setting up message queue with RabbitMQ

A message queue is used to pass submission results asynchronously from the execution-service to the history-service.

1. In order to do so, we can run the following command to set up a docker container for RabbitMQ:

```bash
docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
```

2. Then we can run the execution-service:

```bash
go run main.go
```

3. We can run the history-service by changing our directory and running the same command:

```bash
cd ../history-service
go run main.go
```

To view more details on the RabbitMQ queue, we can go to `localhost:15672`, and login using `guest` as the username and password.
48 changes: 24 additions & 24 deletions apps/history-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,54 +47,54 @@ To start the server, run the following command:
go run main.go
```

The server will be available at http://localhost:8082.
### Setting up message queue with RabbitMQ

## Running the Application via Docker
A message queue is used to pass submission results asynchronously from the execution-service to the history-service.

To run the application via Docker, run the following command:
1. In order to do so, we can run the following command to set up a docker container for RabbitMQ:

```bash
docker build -t history-service .
docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
```

2. Then we can run the history-service:

```bash
docker run -p 8082:8082 -d history-service
go run main.go
```

The server will be available at http://localhost:8082.

## API Endpoints

- `POST /histories`
- `GET /histories/{docRefId}`
- `PUT /histories/{docRefId}`
- `DELETE /histories/{docRefId}`
3. We can run the execution-service by changing our directory and running the same command:

```bash
cd ../execution-service
go run main.go
```

## Setting up message queue with RabbitMQ
To view more details on the RabbitMQ queue, we can go to `localhost:15672`, and login using `guest` as the username and password.

A message queue is used to pass submission results asynchronously from the execution-service to the history-service.
The server will be available at http://localhost:8082.

1. In order to do so, we can run the following command to set up a docker container for RabbitMQ:
### Running the Application via Docker

To run the application via Docker, run the following command:

```bash
docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
docker build -t history-service .
```

2. Then we can run the history-service:

```bash
go run main.go
docker run -p 8082:8082 -d history-service
```

3. We can run the execution-service by changing our directory and running the same command:
The server will be available at http://localhost:8082.

## API Endpoints

- `POST /histories`
- `GET /histories/{docRefId}`
- `PUT /histories/{docRefId}`
- `DELETE /histories/{docRefId}`

```bash
cd ../execution-service
go run main.go
```

To view more details on the RabbitMQ queue, we can go to `localhost:15672`, and login using `guest` as the username and password.

0 comments on commit fac4430

Please sign in to comment.