Skip to content

Commit 01a5b6a

Browse files
committed
Update README.md
- User Service - History Service
1 parent 3127480 commit 01a5b6a

File tree

2 files changed

+42
-10
lines changed

2 files changed

+42
-10
lines changed

HistoryService/README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99
Command:
1010

1111
```
12-
docker-compose build
12+
docker-compose build history-service history-service-database
1313
```
1414

1515
3. Start the Containers.
1616

1717
Command:
1818

1919
```
20-
docker-compose up
20+
docker-compose up history-service history-service-database
2121
```
2222

23-
4. Using Postman or a likewise app, you can connect to `localhost:3006` to send http (REST) queries.
23+
4. Using Postman or a likewise app, you can connect to `http://localhost:3006/history/` to send http (REST) queries.
2424

2525
# Starting Containers Individually
2626

@@ -34,7 +34,7 @@ docker-compose up
3434

3535
Set up a Docker network using the following command, and ensure to use the same network name when starting the various services and databases later. (This step is important if you dont want to run via `docker-compose up` command)
3636

37-
Command:
37+
Using Terminal, Run the following Command:
3838

3939
```
4040
docker network create -d bridge peer-prep-network
@@ -44,6 +44,8 @@ This command is to be run only for the initial set up, and once the network is s
4444

4545
## mySQL Container
4646

47+
Navigate into `HistoryService` Directory
48+
4749
First and foremost change the `databaseUrl` in the `Config/config.js` file to `127.0.0.1`
4850

4951
Start by running this container first, else History Service will not be able to connect to Database.
@@ -64,7 +66,7 @@ docker exec -it history-service-database sh
6466

6567
The above will open a terminal window for the mySql Docker Container, where `mysql` can be used.
6668

67-
## History Service Server
69+
## History Service Microservice
6870

6971
1. Navigate to the `HistoryService` Directory in Terminal or Powershell
7072

@@ -83,3 +85,5 @@ Command:
8385
```
8486
docker run --rm -p 3006:3006 -v $(pwd):/app -it --network peer-prep-network history-service
8587
```
88+
89+
Using Postman or a likewise app, you can connect to `http://localhost:3006/history/` to send http (REST) queries.

UserService/README.md

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# User Service Setup Guide
22

3+
# Quick Start
4+
5+
1. Navigate to the `UserService` Directory in Terminal or Powershell
6+
7+
2. Build the Containers.
8+
9+
Command:
10+
11+
```
12+
docker-compose build user-service user-service-database
13+
```
14+
15+
3. Start the Containers.
16+
17+
Command:
18+
19+
```
20+
docker-compose up user-service user-service-database
21+
```
22+
23+
4. Using Postman or a likewise app, you can connect to `http://localhost:3002/users/` to send http (REST) queries.
24+
325
## There are a few elements to take care of first:
426

527
1. Docker Network
@@ -8,9 +30,9 @@
830

931
## Set Up a Docker Network (Bridge)
1032

11-
Set up a Docker network using the following command, and ensure to use the same network name when starting the various services later.
33+
Set up a Docker network using the following command, and ensure to use the same network name when starting the various services and databases later. (This step is important if you dont want to run via `docker-compose up` command)
1234

13-
Command:
35+
Using Terminal, Run the following Command:
1436

1537
```
1638
docker network create -d bridge user-service-network
@@ -20,7 +42,11 @@ This command is to be run only for the initially set up, and once the network is
2042

2143
## MongoDB Container
2244

23-
Navigate to the `UserServiceDatabase` Directory
45+
Navigate into `UserService` Directory
46+
47+
First and foremost change the `databaseUrl` in the `config.js` file to `mongodb://127.0.0.1:27017/userData` or `mongodb://localhost:27017/userData`
48+
49+
Using Terminal, create a `UserServiceDatabase` Directory relative to `UserService` Directory and Navigate into it.
2450

2551
Start by running this container first, else User Service will not be able to connect to Database
2652

@@ -40,7 +66,7 @@ docker exec -it user-service-database bash
4066

4167
The above will open a terminal window for the MongoDB Docker Container, where `mongosh` can be used.
4268

43-
## User Service Server
69+
## User Service Microservice
4470

4571
Navigate to the `UserService` Directory
4672

@@ -57,5 +83,7 @@ Run this container by running the following command
5783
Command:
5884

5985
```
60-
docker run --rm -p 3000:3000 -v $(pwd):/app -it --network user-service-network user-service
86+
docker run --rm -p 3002:3002 -v $(pwd):/app -it --network user-service-network user-service
6187
```
88+
89+
Using an app like Postman, you can now utilize the User Service on `http://localhost:3002/users/` and send http (REST) queries.

0 commit comments

Comments
 (0)