Package Exports
- @projectriff/function-proto
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@projectriff/function-proto) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gRPC Node.js
Create node module wrapping function.proto
npm install --save @projectriff/function-proto
const { FunctionInvokerService, FunctionInvokerClient } = require('@projectriff/function-proto');
const grpc = require('grpc');
const address = '127.0.0.1:50051';
// server
const server = new grpc.Server();
server.addService(FunctionInvokerService, {
call(call) {
// TODO implement service
}
});
server.bind(address, grpc.ServerCredentials.createInsecure());
server.start();
// client
const client = new FunctionInvokerClient(address, grpc.credentials.createInsecure());See the official gRPC for Node.js reference guide.