Skip to content

Add a GET /health endpoint that returns { status: 'ok', uptime: process.uptime()#324

Open
shivammittal274 wants to merge 2 commits intomainfrom
feat/0RfOvyri-add-a-get-health-endpoint-that-returns--
Open

Add a GET /health endpoint that returns { status: 'ok', uptime: process.uptime()#324
shivammittal274 wants to merge 2 commits intomainfrom
feat/0RfOvyri-add-a-get-health-endpoint-that-returns--

Conversation

@shivammittal274
Copy link
Contributor

Summary

Add a GET /health endpoint that returns { status: 'ok', uptime: process.uptime() } to the main server

Changes

apps/server/src/api/routes/health.ts        | 2 +-
 apps/server/tests/api/routes/health.test.ts | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

Agent Metadata

  • Total cost: $1.2812
  • Stages:
    • ok setup ($0.0000, 62.2s)
    • ok plan ($0.8053, 130.9s)
    • ok implement ($0.4759, 111.9s)

Generated by coding-agent v3

BrowserOS Coding Agent added 2 commits February 11, 2026 12:54
@github-actions
Copy link
Contributor

Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement.

To sign the CLA, please add a comment to this PR with the following text:

I have read the CLA Document and I hereby sign the CLA

You only need to sign once. After signing, this check will pass automatically.


Troubleshooting
  • Already signed but still failing? Comment recheck to trigger a re-verification.
  • Signed with a different email? Make sure your commit email matches your GitHub account email, or add your commit email to your GitHub account.
- - - I have read the CLA Document and I hereby sign the CLA - - - **BrowserOS Coding Agent** seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please [add the email address used for this commit to your account](https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user/#commits-are-not-linked-to-any-user).
You can retrigger this bot by commenting **recheck** in this Pull Request. Posted by the **CLA Assistant Lite bot**.

@claude
Copy link

claude bot commented Feb 11, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 11, 2026

Greptile Overview

Greptile Summary

This PR extends the existing /health route in the consolidated Hono HTTP server to include process uptime in the JSON payload ({ status: 'ok', uptime: process.uptime() }). The corresponding test is updated to assert status === 'ok' and that uptime is a non-negative number, and .agent/ is added to .gitignore to avoid committing coding-agent artifacts.

The new uptime field is computed directly from Node/Bun's process.uptime() within the route handler; the route remains mounted at /health in apps/server/src/api/server.ts via .route('/health', createHealthRoute()).

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk.
  • Changes are small and localized: /health response adds a single computed numeric field and the test assertions were updated accordingly. The route is already wired into the server, and no compatibility or security regressions were found in the touched code.
  • No files require special attention

Important Files Changed

Filename Overview
.gitignore Adds .agent/ to ignored files for coding-agent artifacts; no runtime impact.
apps/server/src/api/routes/health.ts Extends GET /health response to include numeric uptime via process.uptime().
apps/server/tests/api/routes/health.test.ts Updates health route test to assert status and validate uptime is a non-negative number.

Sequence Diagram

sequenceDiagram
  participant Client
  participant HonoApp as Hono app
  participant HealthRoute as /health route
  participant Process as process

  Client->>HonoApp: GET /health
  HonoApp->>HealthRoute: dispatch request
  HealthRoute->>Process: process.uptime()
  Process-->>HealthRoute: uptime (seconds)
  HealthRoute-->>HonoApp: 200 {status:"ok", uptime}
  HonoApp-->>Client: JSON response
Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant