Pure JavaScript gRPC Server
The goal is to be largely compatible with the existing Server implementation.
- 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.
- Server credentials for handling both secure and insecure calls.
- gRPC Metadata.
- gRPC logging.
- No production dependencies.
- No C++ dependencies. This implementation relies on Node's
http2module. - Supports the following gRPC server options:
grpc.http2.max_frame_sizegrpc.keepalive_time_msgrpc.keepalive_timeout_msgrpc.max_concurrent_streamsgrpc.max_receive_message_lengthgrpc.max_send_message_length- All possible options and their descriptions are available here.
- Supports the following gRPC environment variables:
GRPC_DEFAULT_SSL_ROOTS_FILE_PATHGRPC_SSL_CIPHER_SUITESGRPC_VERBOSITY- All possible environment variables and their descriptions are available here.
Server.prototype.bind()is anasyncfunction.- The deprecated
Server.prototype.addProtoService()is not implemented. Server.prototype.addHttp2Port()is not implemented.
- What is gRPC?
- gRPC over HTTP2
- gRPC Compression
- gRPC Environment Variables
- gRPC Keepalive
- gRPC Name Resolution
- gRPC Status Codes
This module is heavily inspired by the grpc native module. Some of the source code is adapted from the @grpc/grpc-js module.