Skip to main content

2 posts tagged with "nodejs"

View All Tags

Integrating Watchtower into a NestJS App

· 8 min read
Mohamed El Amine Meghni
Mohamed El Amine Meghni
Software & DevOps Engineer

Unhandled errors in a NestJS API tend to be discovered the same way: a user complains, someone greps the logs, and by the time anyone's looking, the request context is gone. @sadeem-watchtower/node closes that gap — it captures unhandled HTTP errors, process-level crashes, and manual events, and ships them to a dashboard instead of a log file nobody's tailing.

This post walks through wiring it into a NestJS app: installation, config validation, module registration, and the shutdown handling that keeps you from dropping events on deploy. It also covers a couple of non-obvious integration details that aren't in the SDK's README.

Watchtower NestJS integration

Startup Health Checks: Validate Env & Probe Services Before Your App Accepts Traffic

· 8 min read
Mohamed El Amine Meghni
Mohamed El Amine Meghni
Software & DevOps Engineer

Your application deployed. The CI pipeline went green. The health endpoint returned 200 OK. And then, three minutes later, the first real user request exploded in production with ECONNREFUSED because DATABASE_URL was never set in the new environment.

This class of incident is entirely preventable. The fix is not better monitoring or smarter alerting. It is making the application refuse to start when it is not ready to serve traffic.

This post covers exactly how to do that across two runtimes: NestJS and ASP.NET Core. The pattern is the same in both: validate environment variables first, probe every external service second, and only then bind the HTTP server and accept connections.

Data center server racks