src/ratingservice/server.js
/**
 * Starts an RPC server that receives requests for the
 * ratingConverter service at the sample server port
 */
Starts an RPC server that receives requests for the
ratingConverter service at the sample server port
Starts an RPC server that receives requests for the ratingConverter service at the sample server port
function main() {
  logger.info(`Starting gRPC server on port ${PORT}...`);
  const server = new grpc.Server();
  console.log((shopProto))
  server.addService(shopProto.RatingService.service, { getRatings, addRating });
  server.addService(healthProto.Health.service, { check });
  server.bind(`0.0.0.0:${PORT}`, grpc.ServerCredentials.createInsecure());
  server.start();
}
function main ( ) { logger . info ( ` ${ PORT } ` ) ; const server = new grpc . Server ( ) ; console . log ( ( shopProto ) ) server . addService ( shopProto . RatingService . service , { getRatings , addRating } ) ; server . addService ( healthProto . Health . service , { check } ) ; server . bind ( ` ${ PORT } ` , grpc . ServerCredentials . createInsecure ( ) ) ; server . start ( ) ; }
Starts an RPC server that receives requests for the
 ratingConverter service at the sample server port
Starts an RPC server that receives requests for the ratingConverter service at the sample server port