Skip to content

cli/serve Health check endpoint. GET /health returning {"status": "ok"}. #1066

@markstur

Description

@markstur

Basic Health Check (Liveness)A basic liveness check returns a 200 OK status to signal that the python process is alive and responding.pythonfrom fastapi import FastAPI.

If the app is running, it returns status:healthy (json). No more specific health planned at this time. Perhaps check if we can have a running app w/o any module.serve().

app = FastAPI()

@app.get("/health", status_code=200)
async def liveness_check():
    return {"status": "healthy"}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions