Skip to content

expose a lightweight /healthz endpoint #33

@nofarblue

Description

@nofarblue

📝 Description
To improve observability and Kubernetes readiness, we should expose a lightweight /healthz endpoint that returns a simple 200 OK status. This helps in:

Readiness/liveness probes in orchestration environments

Health checks for load balancers or monitoring tools

CI tests verifying server availability

✅ Acceptance Criteria
Add a new route /healthz that:

Responds to GET

Returns HTTP 200 with body "OK\n"

Ensure no query parameters are needed

Add unit test to verify:

Status code is 200

Response body is "OK\n"

Add log entry for /healthz requests (optional)

🧩 Notes
This is a simple change that touches routing, handler creation, and test writing. It’s ideal for testing Copilot’s ability to:

Scaffold new routes in a Go web server

Write HTTP tests

Recognize standard health check patterns

No external dependencies are required. Low effort, high visibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions