Skip to content

#631 Add Health Check Endpoint to Backend Express Server#681

Open
Olamidepy wants to merge 2 commits into
ceejaylaboratory:mainfrom
Olamidepy:feature/issue-631-add-health-check-endpoint-to-backen
Open

#631 Add Health Check Endpoint to Backend Express Server#681
Olamidepy wants to merge 2 commits into
ceejaylaboratory:mainfrom
Olamidepy:feature/issue-631-add-health-check-endpoint-to-backen

Conversation

@Olamidepy

@Olamidepy Olamidepy commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Closes #631


This PR addresses #631 by implementing active backend dependency status monitoring on the /health endpoint. The endpoint now checks the health of the PostgreSQL database and the Redis cache before returning a status.

Key Changes

  • Active Checks: Updated /health GET handler in src/index.ts to actively query the database (prisma.$queryRaw) and ping Redis (redis.ping()).
  • Response Codes: Returns 200 OK if both services are online, or 503 Service Unavailable if any connection checks fail.
  • Swagger Documentation: Documented the new response structure and HTTP status codes in Swagger OpenAPI specs.
  • Mock & Unit Testing: Added a mock ping command in src/lib/redis.ts and introduced test cases in src/index.test.ts to cover healthy and failure states.
  • Build Fixes: Resolved pre-existing duplicate type and type casting issues in sep12.controller.ts and queue-dashboard.route.ts to ensure clean compilation.

@Olamidepy

Copy link
Copy Markdown
Contributor Author

@Ceejaytech25 Kindly merge

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Olamidepy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Add Health Check Endpoint to Backend Express Server

1 participant