Skip to content
Merged
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
chore(self-hosting): add health check endpoint
Add a simple API health route for deployment platforms and container probes, with focused route coverage.
  • Loading branch information
test committed Mar 13, 2026
commit 0c005600b254a985444591c89da0fa47a2e0fc6b
17 changes: 17 additions & 0 deletions apps/sim/app/api/health/route.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* @vitest-environment node
*/
import { describe, expect, it } from 'vitest'
import { GET } from '@/app/api/health/route'

describe('GET /api/health', () => {
it('returns an ok status payload', async () => {
const response = await GET()

expect(response.status).toBe(200)
await expect(response.json()).resolves.toEqual({
status: 'ok',
timestamp: expect.any(String),
})
})
})
12 changes: 12 additions & 0 deletions apps/sim/app/api/health/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Health check endpoint for deployment platforms and container probes.
*/
export async function GET(): Promise<Response> {
return Response.json(
{
status: 'ok',
timestamp: new Date().toISOString(),
},
{ status: 200 }
)
}
Loading