change grpc port to 9000 (#291)

* change grpc port to 9000

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* change grpc port to 9000

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2017-10-18 20:24:47 -05:00
committed by GitHub
parent 50237f4fd1
commit 6d29e638b4
10 changed files with 15 additions and 15 deletions

View File

@@ -9,7 +9,7 @@ import (
)
const (
address = "localhost:50051"
address = "localhost:9000"
)
func main() {

View File

@@ -4,7 +4,7 @@ var services = require('./gorush_grpc_pb');
var grpc = require('grpc');
function main() {
var client = new services.GorushClient('localhost:50051',
var client = new services.GorushClient('localhost:9000',
grpc.credentials.createInsecure());
var request = new messages.NotificationRequest();
request.setPlatform(2);

View File

@@ -12,7 +12,7 @@ import (
)
const (
port = ":50051"
port = ":9000"
)
// server is used to implement gorush grpc server.
@@ -46,7 +46,7 @@ func RunGRPCServer() error {
lis, err := net.Listen("tcp", ":"+gorush.PushConf.GRPC.Port)
if err != nil {
gorush.LogError.Error("failed to listen: %v", err)
gorush.LogError.Errorf("failed to listen: %v", err)
return err
}
s := grpc.NewServer()
@@ -55,7 +55,7 @@ func RunGRPCServer() error {
reflection.Register(s)
gorush.LogAccess.Debug("gRPC server is running on " + gorush.PushConf.GRPC.Port + " port.")
if err := s.Serve(lis); err != nil {
gorush.LogError.Error("failed to serve: %v", err)
gorush.LogError.Errorf("failed to serve: %v", err)
return err
}