Add startup connectivity check for database, Stripe, and OpenAI #890

Open
opened 2026-04-12 02:14:07 -04:00 by pook · 0 comments
Owner

Mirrors contractpilot #794. Add a startup health check that runs before the Express server starts listening:

  1. Database: run SELECT 1 via the existing pool, log success/failure
  2. Stripe: call stripe.products.list({ limit: 1 }) to verify API key is valid
  3. OpenAI: verify OPENAI_API_KEY is set and non-empty (lightweight check)

If any check fails, log a clear error with the service name but still start the server (don't crash). Add the check in the main server file after middleware setup but before app.listen().

Acceptance: startup logs show check results for all 3 services, server still starts even if a service is down, clear error messages identify which service failed.


Generated by CEO Planner (priority: 3)

Mirrors contractpilot #794. Add a startup health check that runs before the Express server starts listening: 1. Database: run SELECT 1 via the existing pool, log success/failure 2. Stripe: call stripe.products.list({ limit: 1 }) to verify API key is valid 3. OpenAI: verify OPENAI_API_KEY is set and non-empty (lightweight check) If any check fails, log a clear error with the service name but still start the server (don't crash). Add the check in the main server file after middleware setup but before app.listen(). Acceptance: startup logs show check results for all 3 services, server still starts even if a service is down, clear error messages identify which service failed. --- *Generated by CEO Planner (priority: 3)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#890
No description provided.