grpc-client
v0.1.4
Published
wrapper grpc client
Downloads
104
Readme
grpc-client
example
var grpcClient = require('grpc-client');
var gc = new grpcClient({host:"localhost:50051",dir:'./',header:{custom:['customvalue']}});
gc.proto("helloworld")
.sayHello({name:"xing"})
.then(function(res){
console.log(res);
})
.catch(function(err){
console.log(err);
})
or
gc.proto("helloworld")
.call("SayHello")
.send({name:"xing"})
.then(function(res){
console.log(res);
})
.catch(function(err){
console.log(err);
})host is grpc server
dir is proto file folder
header is your custom matedata
