Lightweight configurator for building gRPC servers with interceptor support. Current stable version is 6.4.4, released under an active development cadence. This library provides a fluent builder pattern to construct gRPC servers using @grpc/grpc-js, with built-in support for loggers, interceptors, and service registration. It simplifies server setup by chaining methods like addInterceptor, addService, and useLoggersFactory, and offers async build via buildAsync. Differentiates from raw gRPC setup by providing a higher-level abstraction with minimal overhead.
npm install grpc-host-builderNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create a gRPC server with interceptor and service registration using GrpcHostBuilder.
Await buildAsync() result. Update code from const server = new GrpcHostBuilder().buildAsync(); to const server = await new GrpcHostBuilder().buildAsync();
Use import { GrpcHostBuilder } from 'grpc-host-builder' instead of require.Ensure interceptor classes implement invoke method matching expected signature.
Run npm install @grpc/grpc-js alongside grpc-host-builder.
Change import GrpcHostBuilder from 'grpc-host-builder' to import { GrpcHostBuilder } from 'grpc-host-builder'Run npm install @grpc/grpc-js
Ensure you are calling buildAsync on a GrpcHostBuilder instance and using version >=6.0.0 that returns a promise.