Skip to content

feat: add database health check endpoint#91

Merged
heitorrsdev merged 1 commit intomainfrom
feat/database-health-check
Apr 26, 2026
Merged

feat: add database health check endpoint#91
heitorrsdev merged 1 commit intomainfrom
feat/database-health-check

Conversation

@heitorrsdev
Copy link
Copy Markdown
Owner

Description

This PR introduces a specific database health check endpoint at /health/db to separate basic application availability from database connectivity status.

What was done

  • Added @Get('db') endpoint to HealthController that executes a simple SQL query.
  • Kept @Get() as a non-database health check for basic heartbeat monitoring.
  • Added E2E tests for the new endpoint in test/health/health.e2e.spec.ts.

Why

Separating health checks allows for more granular monitoring. Basic health checks can be used for liveness probes, while the database health check can be used for readiness probes, providing better insight into the system's operational state.

@heitorrsdev heitorrsdev merged commit 5729419 into main Apr 26, 2026
1 check passed
@heitorrsdev heitorrsdev deleted the feat/database-health-check branch April 26, 2026 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant