Last active
April 26, 2019 15:20
-
-
Save mohak1712/7cd1a185f1b4e07d32eaea763d51cc62 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
var grpc = require('grpc'); | |
var pingPongProto = grpc.load('ping_pong.proto'); | |
var server = new grpc.Server(); | |
server.addService(pingPongProto.pingpong.PingPongService.service, { | |
pingPong: function(call,callback) { | |
console.log("Request") | |
return callback(null,{pong:"Pong"}) | |
} | |
}); | |
server.bind('localhost:8080',grpc.ServerCredentials.createInsecure()); | |
server.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment