GET /health/db

Check database connectivity and basic system health.

This endpoint performs a basic health check to verify database connectivity.

It is primarily intended for monitoring, diagnostics, and deployment verification.

When to use

  • During deployment or startup checks
  • For uptime and monitoring probes
  • To verify database connectivity

Request

HTTP
GET /health/db

This endpoint does not require authentication.

Response

Healthy (200 OK)

Response
{
  "success": true,
  "database": "connected"
}

A successful response indicates that the application can communicate with the configured database.

Errors

Database unavailable (500)

Error
{
  "success": false,
  "message": "Database connection failed"
}

Notes

  • This endpoint should be lightweight and fast
  • It does not perform deep application checks
  • Safe to expose to load balancers and monitoring tools

Related APIs

  • POST /api/auth/login – Authentication API