A Node.js library for building gRPC servers and clients with Consul service discovery. Current version 1.1.6, released on npm. Provides GrpcServer and GrpcClient classes that load .proto files, handle service registration via Consul, and support both callback and promisified patterns. Differentiates from other gRPC libraries by tightly integrating service discovery through Consul or Nacos, making it suitable for microservice architectures. It uses the official @grpc/grpc-js under the hood.
npm install gioneco-grpcNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a gRPC server and client with Consul service discovery.
Always pass explicit port to ServiceRegistry.
Use exact proto package and service names as defined in .proto files.
Always check if client is null before invoking RPC.
Set ServiceRegistry promisify: true to enable promise-based client calls.
Use absolute or relative path to a folder with .proto files.
Ensure Consul agent is running on the specified host and port.
Verify the service name matches exactly (e.g., 'helloworld') and that the .proto file defines the 'SayHello' RPC.
Wait for server.ready() to complete and ensure registry is configured correctly.