Skip to content

Implement Health and Readiness Check Endpoints in a Dedicated Route Module #1

@thlpkee20-wq

Description

@thlpkee20-wq

Description
Add a dedicated route module for health and readiness checks so that the main app does not need to be modified when adding other routes.

Requirements and context

  • Implement only in new files. Do not modify package.json, src/index.ts, or any shared app/bootstrap file. Add src/routes/health.ts (or equivalent) so the route auto-loader picks it up.
  • Expose GET /health (liveness) and optionally GET /ready (readiness, e.g. DB connectivity) with JSON responses.
  • Must be secure, tested, and documented.

Suggested execution

  • Fork the repo and create a branch: git checkout -b feature/health-readiness-routes
  • Add src/routes/health.ts exporting a router and path (per project route convention).
  • Implement handlers that return { status: 'ok', service: 'revora-backend' } and, for readiness, check any shared dependency (e.g. DB) if available.
  • Add unit tests for the health/ready handlers (e.g. in src/routes/__tests__/health.test.ts or similar).
  • Do not change src/index.ts or central app wiring.

Test and commit

  • Run tests and ensure health/ready respond as expected.
  • Example commit message: feat(api): add health and readiness route module

Guidelines

  • No merge conflicts: only new files under src/routes/ (and tests). Timeframe: 96 hours.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions