Skip to content

[BACKEND] Add a health check that reports storage mode and DB connectivity #34

Description

@Trovic1

Summary

Extend the health route to report whether storage is postgres or local-json and, for Postgres, whether a test query succeeds.

Scope

  • backend only

Likely files

  • src/app.js
  • src/lib/db.js

Acceptance criteria

  • Health returns storage mode
  • In Postgres mode it reports DB reachable/unreachable without leaking credentials
  • Returns 200 when healthy, 503 when DB is required but down

Verification

  • Run with and without DATABASE_URL and confirm the reported mode

Labels: backend, enhancement, good first issue


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions