A simple gRPC synchronous wrapper for Node.js, version 1.10.1. It simplifies unary calls and provides a configurable client/server setup. Built on top of @grpc/grpc-js, @grpc/proto-loader, and grpc, it requires explicit peer dependency installation. Notable differentiators: sync-style async/await usage, built-in error escaping for Chinese messages, and minimal boilerplate compared to raw gRPC. Currently does not support streaming calls. Maintained by gnatservice.
npm install gnat-grpcNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to configure gnat-grpc, create a server, register a service handler, and start listening.
Call config() in a separate module and require it first.
Use raw @grpc/grpc-js if you need streaming.
Ensure both packages are installed and version constraints are met.
Set escapeErrorAnyway: false in config to disable based on grpc version.
Ensure config() is called in a required module before using gnat-grpc exports.
Run: npm install @grpc/grpc-js @grpc/proto-loader grpc
Check that config() was called and new Server({ bindPath }) is used correctly.