1.1.2 • Published 5 years ago

egg-grpc-client-ts-plus v1.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

egg-grpc-client-ts-plus

TypeScript version of egg grpc client plugin.

Inspired by egg-grpc-client and egg-grpc-client-ts.

NPM version build status Test coverage David deps Known Vulnerabilities npm download

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

Install

$ npm i egg-grpc-client-ts-plus --save

Usage

// {app_root}/config/plugin.[t|j]s
exports.grpcClient = {
  enable: true,
  package: 'egg-grpc-client-ts-plus',
};

Configuration

// {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.

Example

Questions & Suggestions

Please open an issue here.

License

MIT

Test

# start test grpc server
npm run test-server

# In another shell, run:
npm run test-local
1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago