Created
June 20, 2021 18:52
-
-
Save aatifbandey/9e82ee9918b78e29bd49a165da24ef9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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