Gaia is a Node.js framework for building gRPC services with a focus on intuitive service definition, custom error handling, and shareable .proto files packaged as npm dependencies. Current version 3.1.7 supports both proto2 and proto3, integrates with Egg.js plugins, and provides optional RESTful API routing on top of gRPC. It distinguishes itself from raw gRPC by offering opinionated structure, built-in controller orchestration, and centralized proto management. Development appears sporadic with no recent releases.
npm install gaiaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a gRPC server and client with Gaia's intuitive API, loading proto files from a root directory.
Use destructuring to extract services: const { Greeter } = client.connect(host)Replace server.kill() with await server.close()
Ensure .proto files are in a directory with package.json or use includeDirs
Upgrade your proto definition to be compatible with Gaia's loader
Use CommonJS require()
Run 'npm install gaia'
Use const { Client } = require('gaia')Create a package.json in the proto directory or use { includeDirs } configUse a different port or kill the existing process