feat: add database configuration and health check

This commit is contained in:
Schubert Ferenc 2026-07-01 20:50:17 +02:00
parent 3d53a94d59
commit 3701c50711
9 changed files with 72 additions and 2 deletions

View file

@ -1,5 +1,7 @@
from fastapi import FastAPI
from app.db.health import check_database
app = FastAPI(
title="Hermes API",
version="0.1.0",
@ -9,9 +11,15 @@ app = FastAPI(
@app.get("/")
def root():
return {"service": "Hermes", "status": "running"}
return {
"service": "Hermes",
"status": "running"
}
@app.get("/health")
def health():
return {"status": "healthy"}
return {
"status": "healthy",
"database": check_database()
}