Last active
October 5, 2022 07:10
-
-
Save nsbeyond/67436d6145b8e0532df1ab4897421ab9 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 AUTHENTICATION_PROTO_DIR = path.resolve("proto/authentication"); | |
const authenticationProtoFiles = fs.readdirSync(AUTHENTICATION_PROTO_DIR); | |
const authenticationProtoPaths = _.map(authenticationProtoFiles, (f) => | |
path.join(AUTHENTICATION_PROTO_DIR, f) | |
); | |
const grpc = new GRPCClient( | |
authenticationProtoPaths, | |
"authentication", | |
"Authentication", | |
"localhost:50051", | |
{ | |
cert: path.resolve("tls/authentication/server.crt"), | |
} | |
); | |
grpc.runService( | |
'Hello', | |
dataToSend, (err, res) => { | |
console.log('Service response 2', res); | |
console.log('Service error 2', err); | |
}, options | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment