grpc-server-js
Pure JavaScript gRPC Server
Documentation
The goal is to be largely compatible with the existing Server
implementation.
Features
- Unary calls.
- Streaming client request calls.
- Streaming server response calls.
- Bidirectional streaming calls.
- Deadline and cancellation support.
- Support for gzip and deflate compression, as well as uncompressed messages.
- The only third party dependency is
@grpc/grpc-js
, which is used for some shared data structures. - No C++ dependencies. This implementation relies on Node's
http2
module.
Public API Deviations from the Existing grpc.Server
Server.prototype.bind()
is an async
function.- The deprecated
Server.prototype.addProtoService()
is not implemented. Server.prototype.addHttp2Port()
is not implemented.Server.prototype.forceShutdown()
is not implemented.
Acknowledgement
This module is heavily inspired by the grpc
native module. Some of the source code is adapted from the @grpc/grpc-js
module.
Useful References