Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,6 @@ log.txt

# Testing iteration temp files
tmp/

# Coding agent artifacts
.agent/
2 changes: 1 addition & 1 deletion apps/server/src/api/routes/health.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ import { Hono } from 'hono'

export function createHealthRoute() {
return new Hono().get('/', (c) => {
return c.json({ status: 'ok' })
return c.json({ status: 'ok', uptime: process.uptime() })
})
}
4 changes: 3 additions & 1 deletion apps/server/tests/api/routes/health.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ describe('createHealthRoute', () => {

assert.strictEqual(response.status, 200)
const body = await response.json()
assert.deepStrictEqual(body, { status: 'ok' })
assert.strictEqual(body.status, 'ok')
assert.strictEqual(typeof body.uptime, 'number')
assert.ok(body.uptime >= 0)
})
})
Loading