ugrpc is a gRPC library for Node.js that simplifies the creation of gRPC servers and clients with built-in health check support. Version 1.5.1 provides a concise API for setting up microservice communications using protocol buffers. It uses @grpc/proto-loader for loading .proto files and offers configurable options. The package includes automatic health check service integration, allowing you to define custom health dependencies and update statuses dynamically. It supports both CommonJS and ESM (via TypeScript types) but the examples use require(). Releases are sporadic, and the package is maintained by a single developer. Compared to other gRPC libraries like @grpc/grpc-js, ugrpc abstracts away boilerplate code for server and client initialization, making it suitable for rapid prototyping in microservice environments.
npm install ugrpcNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a gRPC server with a sum controller and a client that calls the sum method with a 30-second deadline.
Verify that proto.packageName equals the proto package name (without quotes) and proto.serviceName equals the service name.
Always set the name property when using healthcheckStatus, or omit both to use default serving status.
Pass the timeout value in milliseconds (e.g., 30000 for 30 seconds).
Ensure each controller async function returns a plain object matching the response message fields.
Run 'npm install ugrpc' in your project directory.
Check that Server is imported correctly and instantiated with the new keyword: 'const server = new Server({...});'.Verify that the proto file defines the service and method correctly, and that the controller method name (e.g., 'sum') corresponds to the rpc name in lowercase.