A Node.js library for registering gRPC servers with etcd for service discovery. Version 1.0.4 is the latest release; it wraps the etcd3 and grpc packages to provide a simple registry/unregister API. Key differentiator: opinionated integration with etcd3 for service naming, supporting multiple etcd endpoints. The package uses callbacks and does not ship TypeScript definitions.
npm install grpc-server-registerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Registers a gRPC server with etcd using the library, starts the server, and unregisters on shutdown.
Install the peer dependency: npm install etcd3 grpc
Double-check parameter order: prefix, serviceName, ip, port, endpoints, ttl, timeout
Migrate to @grpc/grpc-js for modern gRPC support; this library may not work with it.
Always use await or catch on the returned promise.
For multiple services, manage separate registry instances manually.
Use const register = require('grpc-server-register'); then register.registry(...)Ensure etcd is accessible at the provided endpoints; check network connectivity.
Run npm install etcd3
Verify PROTO_PATH points to valid .proto file and that the service is correctly defined.