Repository URL to install this package:
|
Version:
3.0.0-1 ▾
|
| .. |
| src |
| build |
| package.json |
| LICENSE |
| README.md |
Node 12 is recommended. The exact set of compatible Node versions can be found in the engines field of the package.json file.
npm install @grpc/grpc-js
Documentation specifically for the @grpc/grpc-js package is currently not available. However, documentation is available for the grpc package, and the two packages contain mostly the same interface. There are a few notable differences, however, and these differences are noted in the "Migrating from grpc" section below.
This library does not directly handle .proto files. To use .proto files with this library we recommend using the @grpc/proto-loader package.
grpc@grpc/grpc-js is almost a drop-in replacement for grpc, but you may need to make a few code changes to use it:
.proto files using grpc.load, that function is not available in this library. You should instead load your .proto files using @grpc/proto-loader and load the resulting package definition objects into @grpc/grpc-js using grpc.loadPackageDefinition.grpc-tools, you should instead generate your files using the generate_package_definition option in grpc-tools, then load the object exported by the generated file into @grpc/grpc-js using grpc.loadPackageDefinition.Server#bind to bind ports, you will need to use Server#bindAsync instead.The public API of this library follows semantic versioning, with some caveats:
Call is only exposed due to limitations of TypeScript. It should not be considered part of the public API.grpc library is likely an error and should not be considered part of the public API.grpc.experimental namespace contains APIs that have not stabilized. Any API in that namespace may break in any minor version update.