@zedtech/zedkit-nest
Bootstrap a Nest app
Boot a hardened Nest app (validation, logging, docs, throttling, errors, shutdown) from one factory call.
At a glance
- Who: Teams starting a production NestJS API with secure defaults.
- What: Boot a hardened Nest app (validation, logging, docs, throttling, errors, shutdown) from one factory call.
- Use when: For every new Nest service that needs production defaults on day one.
- Avoid when: For an existing app with its own bootstrap — adopt single pieces (logger, filter) instead.
- See also: Ship request logs without leaking credentials, Return uniform error bodies
Install
pnpm add @zedtech/zedkit-nestLatest: 1.1.1 (via changesets).
Example
import { createNestApp } from "@zedtech/zedkit-nest";
const app = await createNestApp({ module: AppModule, envSchema: AppEnv });
await app.listen(3000);Wraps: @nestjs/platform-fastify, @nestjs/config, @nestjs/swagger, @nestjs/throttler, nestjs-pino, class-validator
Receive WebSocket messages with reconnect and polling backup
Open a WebSocket on demand, reconnect with jittered exponential backoff, resolve the URL per attempt, and run a fallback source while it is down.
Ship request logs without leaking credentials
Request logging with auth headers and cookies redacted by default.