You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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();
The text was updated successfully, but these errors were encountered:
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();
The text was updated successfully, but these errors were encountered: