Skip to content

Add a /api/health endpoint that returns uptime and version #4

@noeljackson

Description

@noeljackson

Add a Nitro server route at /api/health that returns JSON with:

  • status: "ok"
  • uptime: process uptime in seconds
  • version: read from package.json
  • timestamp: current ISO timestamp

Example response

{
  "status": "ok",
  "uptime": 1234,
  "version": "0.1.0",
  "timestamp": "2026-02-11T12:00:00.000Z"
}

Acceptance criteria

  • GET /api/health returns 200 with JSON body
  • Response includes all four fields
  • Works when accessed via browser or curl

Metadata

Metadata

Assignees

No one assigned

    Labels

    launch-codespaceAuto-launch a Coder workspace for this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions