feat(server): add GET /api/v1/uptime endpoint #67

Merged
arcodange merged 1 commits from vibe/batch2-task-b-uptime into main 2026-05-05 19:18:25 +02:00

1 Commits

Author SHA1 Message Date
3f2f845ef2 feat(server): add GET /api/v1/uptime endpoint
Add new endpoint that returns server start time and uptime duration in seconds.
The endpoint follows the same pattern as handleHealth and handleInfo handlers,
using the existing startedAt field from the Server struct.

Response format:
{
  "start_time": "2026-05-05T19:30:00Z",
  "uptime_seconds": 1234
}

Includes unit tests with httptest.NewRecorder() to verify JSON response
structure and content type headers.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-05-05 19:17:59 +02:00