Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

缺少 grpc server 服务 #7

Open
laogewen82 opened this issue Jul 10, 2016 · 1 comment
Open

缺少 grpc server 服务 #7

laogewen82 opened this issue Jul 10, 2016 · 1 comment

Comments

@laogewen82
Copy link

grpc client 出现错误:
/home/ubuntu/tisan-web-ide/service/grpc.js:4
var client = new product_grpc.ProductCMDS(config.grpc[0],grpc.Credentials.createInsecure());

TypeError: Cannot read property 'createInsecure' of undefined
at Object. (/home/ubuntu/tisan-web-ide/service/grpc.js:4:74)

感觉应该缺少 grpc server 服务,请问这个grpc server 侧的能补充一下吗?
grpc: [ 'localhost:20311' ],

研究了一下 grpc server 应该是如下这样的吧? 请指点一下,谢谢!

function getServer() {
var server = new grpc.Server();
server.addProtoService(routeguide.RouteGuide.service, {
getFeature: getFeature,
listFeatures: listFeatures,
recordRoute: recordRoute,
routeChat: routeChat
});
return server;
}
var routeServer = getServer();
routeServer.bind('0.0.0.0:50051', grpc.ServerCredentials.createInsecure());
routeServer.listen();

@Zhang-Jia
Copy link

@nskyzier 问题解决了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants