Skip to content

Instantly share code, notes, and snippets.

@yuriatgoogle
Last active April 7, 2018 23:23
Show Gist options
  • Save yuriatgoogle/8c3eb493dcaa635effaafebbe8c47392 to your computer and use it in GitHub Desktop.
Save yuriatgoogle/8c3eb493dcaa635effaafebbe8c47392 to your computer and use it in GitHub Desktop.
/**
* Starts an RPC server that receives requests for the Greeter service at the
* sample server port
*/
function main() {
var server = new grpc.Server();
server.addService(hello_proto.Greeter.service, {sayHello: sayHello});
server.bind('0.0.0.0:50051', grpc.ServerCredentials.createInsecure());
server.start();
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment