TypeScript version of egg grpc client plugin.
Inspired by egg-grpc-client and egg-grpc-client-ts.
This package is cloned from [egg-grpc-client-ts]. The only difference is that you can define max_send_message_length and max_receive_message_length in the config
$ npm i egg-grpc-client-ts-plus --save
// {app_root}/config/plugin.[t|j]s
exports.grpcClient = {
enable: true,
package: 'egg-grpc-client-ts-plus',
};
// {app_root}/config/config.default.[t|j]s
exports.grpcClient = {
clients: [
{
name: 'main',
protoPath: 'app/proto/main',
host: '0.0.0.0',
port: 50051,
maxSendMessageLength: -1,
maxReceiveMessageLength: 4 * 1024 * 1024,
},
],
};
see config/config.default.ts for more detail.
Please open an issue here.
# start test grpc server
npm run test-server
# In another shell, run:
npm run test-local