Skip to content

Commit 51353eb

Browse files
committed
Updated the README to reflect changes
1 parent 33116e4 commit 51353eb

File tree

1 file changed

+5
-24
lines changed

1 file changed

+5
-24
lines changed

examples/gRPC/README.md

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,41 +16,22 @@ Follow **'main'** branch READ>ME steps: Pre-Installation, Install Dependencies b
1616

1717
On each microservice in example/microserivces, perform the following steps
1818
- *Do this for microservices: books, orders, & reverse proxy
19-
- Install dotenv `npm install dotenv`
20-
- Create a .env file across each ,microservices and input your own Mongodb Atlast URI for both Microservice_URI and CHRONOS_URI
21-
- ** Reverse Proxy .env file will only require CHRONOS_URI
19+
- Create a .env file under each microservice folder and input your own Mongodb Atlast URI for Microservice_URI, CHRONOS_URI and ORDER_URI, see example below:
2220

2321
```
2422
BOOK_URI = mongodb+srv://<username>:<password>@cluster0.o2hx5.mongodb.net/<dbname>?retryWrites=true&w=majority
2523
2624
CHRONOS_URI = mongodb+srv://<username>:<password>@cluster0.o2hx5.mongodb.net/<dbname>?retryWrites=true&w=majority
27-
```
28-
- In each Microservice Mode.js file import and set the Microservice_URI
29-
30-
```
31-
const myURI = process.env.BOOK_URI;
3225
26+
ORDER_URI = mongodb+srv://<username>:<password>@cluster0.o2hx5.mongodb.net/<dbname>?retryWrites=true&w=majority
3327
```
28+
- In each Microservice Mode.js file import and set the Microservice_URI
29+
- In each Microservices *chronos-config.js* file, verify that `"mode"` property has a value of `"microservices"`
3430

35-
- In each of the chronos-config.js files, import and set URI property in database to the Chronos_URI as shown
36-
37-
```
38-
require('dotenv').config();
39-
const chronos = require('@chronosmicro/tracker');
40-
41-
chronos.use({
42-
microservice: 'name of microservice e.g books or orders',
43-
interval: 2000,
44-
database: {
45-
type: 'MongoDB'
46-
URI: process.env.CHRONOS_URI
47-
},
48-
notifications: [],
49-
})
5031
```
5132
- **Note: The Initialize Chronos step is already taken care of for you.
33+
- Inside each microservice directory, install all dependencies using the `npm install`
5234
- Run `npm run start` in each folder directory
53-
- To do so, within each microservice directory, install all dependencies using the `npm install`
5435
- Head over to localhost:3030 to view reverse proxy acting as the frontend of this microservice example
5536
- Start adding data!
5637
- Run `npm run both` to start Electron app

0 commit comments

Comments
 (0)