Skip to content

Instantly share code, notes, and snippets.

@aatifbandey
Created June 20, 2021 18:52
Show Gist options
  • Save aatifbandey/9e82ee9918b78e29bd49a165da24ef9e to your computer and use it in GitHub Desktop.
Save aatifbandey/9e82ee9918b78e29bd49a165da24ef9e to your computer and use it in GitHub Desktop.
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const PROTO_PATH = __dirname +'/salary.proto';
const packageDefinition = protoLoader.loadSync(PROTO_PATH, {
keepCase: true,
longs: String,
enums: String,
defaults: true,
oneofs: true,
});
let employee_proto = grpc.loadPackageDefinition(packageDefinition).employee;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment