Skip to content

cgx9/grpc-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published