如何增加 Node.js gRPC 客户端的最大消息大小?
我们使用grpc
,grpc-tools
和protobufjs
npm 包:
const packageDefinitions = loader.loadSync(PROTO_PATH, { includeDirs: [__dirname], longs: String, arrays: true });
const packageObject = grpc.loadPackageDefinition(packageDefinitions);
const client = new packageObject.Service(serviceAddress, grpc.credentials.createInsecure());