Skip to content

Commit af1232e

Browse files
committed
added comments in chronos_npm_package, docker example, gRPC examples
1 parent 877591a commit af1232e

File tree

6 files changed

+8
-4
lines changed

6 files changed

+8
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export DISPLAY="`sed -n 's/nameserver //p' /etc/resolv.conf`:0"
9292
### Packing the Chronos App into an Executable
9393

9494
1. From the root directory, run `npm run build`
95-
2. Run `npm package`
95+
2. Run `npm run package`
9696
3. Find the `chronos.app` executable inside the newly created `release-builds` folder in the root directory.
9797

9898
#

chronos_npm_package/controllers/mongo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ mongo.health = async ({ microservice, interval, mode }) => {
131131
};
132132

133133
/**
134-
* Runs instead of health if dockerized is true
134+
* !Runs instead of health if dockerized is true
135135
* Collects information on the docker container
136136
*/
137137
mongo.docker = ({ microservice, interval, mode }) => {

chronos_npm_package/controllers/postgres.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ postgres.health = async ({ microservice, interval, mode }) => {
221221
};
222222

223223
/**
224-
* Runs instead of health
224+
* !Runs instead of health for docker
225225
* If dockerized is true, this function is invoked
226226
* Collects information on the container
227227
*/

examples/docker/books/BookServer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const cors = require('cors');
44
const controller = require('./BookController.js');
55

66
const chronosConfig = require('./chronos-config.js');
7+
// follow directions in chronos_npm_tracker README - this downloads an npm package that a previous iteration made
78
const Chronos = require('@chronosmicro/tracker');
89
const chronos = new Chronos(chronosConfig);
910

examples/gRPC/reverse_proxy/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const addBook = () => {
3333
display.appendChild(listItem);
3434
})
3535
.catch(err => {
36-
console.log(err);
36+
console.log("error in the addBook method: ", err);
3737
});
3838
}
3939
};

examples/gRPC/reverse_proxy/reverseProxyServer.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const PORT = 3000;
22
const express = require('express');
33
const path = require('path');
44
const grpc = require('@grpc/grpc-js');
5+
// uuid creates unqiue identifiers
56
const { v4: uuidv4 } = require('uuid');
67
const Chronos = require('@chronosmicro/tracker');
78
const chronosConfig = require('./chronos-config');
@@ -10,6 +11,7 @@ require('./chronos-config');
1011

1112
chronos.track();
1213
const app = express();
14+
// requiring in the clients used for this reverse proxy server
1315
const orderClient = require('./orderClient.js');
1416
const bookClient = require('./bookClient.js');
1517

@@ -18,6 +20,7 @@ app.use(express.json());
1820

1921
app.use(express.static(path.join(__dirname)));
2022

23+
// HTML file to serve upon accessing PORT 3000
2124
app.get('/', (req, res, next) => {
2225
res.sendFile(path.join(__dirname, './index.html'));
2326
});

0 commit comments

Comments
 (0)