Install @grpc/grpc-js and @grpc/proto-loader. Define service methods in a .proto file. Bootstrap the microservice with Transport.GRPC pointing to the proto file. Decorate handler methods with @GrpcMethod('ServiceName', 'MethodName') where the names must exactly match the proto service and rpc definitions.
package in options must match the package statement in the .proto file.
@GrpcMethod('ServiceName', 'MethodName') — both names must exactly match the proto definitions.
The proto file path must resolve correctly at runtime — use __dirname and join() for portability.
Client uses getService<ServiceClient>('ServiceName') to get a typed client proxy for calling remote methods.
Share the .proto file between services via a shared npm package or a git submodule for consistency.