Add health checks to Node.js services (#26)
* Move Node healthchecks to gRPC * gitignore proto files * Switch to standard health RPC * Fix lint * Update client.js * Add protos back + update them * node services: fix & run genproto.sh this gets currencyservice to work but paymentservice is still crashing in the docker container. Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com> * Fix docker breaking * update dockerfiles with released health probe Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
parent
360d983512
commit
6c37a96f3a
18 changed files with 313 additions and 109 deletions
|
@ -22,7 +22,7 @@ const grpc = require('grpc');
|
|||
const leftPad = require('left-pad');
|
||||
|
||||
const PROTO_PATH = path.join(__dirname, './proto/demo.proto');
|
||||
const PORT = 31337;
|
||||
const PORT = 7000;
|
||||
|
||||
const shopProto = grpc.load(PROTO_PATH).hipstershop;
|
||||
const client = new shopProto.CurrencyService(`localhost:${PORT}`,
|
||||
|
@ -49,7 +49,7 @@ client.getSupportedCurrencies({}, (err, response) => {
|
|||
}
|
||||
});
|
||||
|
||||
client.convert(request, function (err, response) {
|
||||
client.convert(request, (err, response) => {
|
||||
if (err) {
|
||||
console.error(`Error in convert: ${err}`);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue