Skip to content

gRPC + ConnectRPC for Node.js

From your first RPC to operating a service

Connectum provides a TypeScript service runtime for proto contracts, request middleware, security, observability, and operations.

Docs
1.3.x
Compatibility
Runtime matrix

Start by goal

Choose a path for the task at hand.

One service lifecycle

Add capabilities through explicit modules.

The framework keeps lifecycle and registration predictable while modules remain explicit. Begin with the server; add production behavior as the service grows.

  1. 01DefineProto contracts and generated types
  2. 02RunServer lifecycle and transport
  3. 03ProtectValidation, auth, and resilience
  4. 04ObserveTraces, metrics, and logs
  5. 05OperateHealth, shutdown, and deployment

Fits your stack

Choose a runtime for each service.

Use ConnectRPC or gRPC, connect to supported brokers, and choose Node.js or Bun for each service.

  • ConnectRPC
  • gRPC
  • Kubernetes
  • Istio
  • OpenTelemetry
  • RabbitMQ
  • Kafka
  • NATS
  • Redis
  • AMQP
  • Redpanda
  • TypeScript
  • Bun
  • Node.js
  • pnpm

The central primitive

Compose a service with an explicit lifecycle.

Services, protocols, middleware, and shutdown policy meet at createServer(). The full tutorial defines the proto, implements the handler, starts the service, and verifies a real RPC.

server.ts
typescript
import { createServer } from '@connectum/core';
import { Healthcheck } from '@connectum/healthcheck';
import { createDefaultInterceptors } from '@connectum/interceptors';
import { Reflection } from '@connectum/reflection';
import { greeterService } from './services/greeterService.ts';
const server = createServer({
  services: [greeterService],
  port: 5000,
  protocols: [Healthcheck({ httpEnabled: true }), Reflection()],
  interceptors: createDefaultInterceptors(),
  shutdown: { autoShutdown: true },
});
await server.start();

Explore modules

Find modules by capability.

Each module links to its guide, configuration help, and generated API reference.

Foundation

Foundation

@connectum/core

Server lifecycle, service registration, configuration, TLS, and in-process clients.

createServer · defineService · createCatalogClient

Security

Security

@connectum/auth

JWT, gateway, session, internal-service authentication, and authorization.

createJwtAuthInterceptor · createAuthzInterceptor · requireAuthContext

Communication

Communication

@connectum/events

Proto-first publish and subscribe with middleware, retries, and dead-letter handling.

createEventBus · MemoryAdapter · createBroadcastSubscribers

Operations

Operations

@connectum/otel

OpenTelemetry tracing, metrics, logging, providers, and client/server instrumentation.

createOtelInterceptor · initProvider · getLogger

Tooling and testing

Tooling and testing

@connectum/cli

Service scaffolding, service generation, version inspection, and reflection-based proto sync.

connectum init · connectum generate service · connectum proto sync

Tooling and testing

@connectum/testing

Supported test servers, local transports, parity helpers, collectors, and assertions.

createTestServer · withTestServer · createLocalClient

Tooling and testing

@connectum/test-fixtures

Low-level mock factories and protobuf descriptor fixtures for advanced test tooling.

createMockRequest · createFakeService · createMockStream

Compare all packages →

Keep moving

From evaluation to operation.