File size: 641 Bytes
4f94787
 
11ba014
b127732
4f94787
 
 
ad2999f
4f94787
11ba014
4f94787
 
 
 
b127732
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from fastapi import FastAPI
from api.status import router as status_router
from api.chat import router as chat_router
from core.memory import check_redis_health

app = FastAPI()

# Mount routers
app.include_router(status_router, prefix="/api")
app.include_router(chat_router, prefix="/api")

@app.get("/")
async def root():
    return {"message": "AI Life Coach API is running"}

@app.get("/health")
async def health_check():
    """Health check endpoint"""
    redis_healthy = check_redis_health()
    return {
        "status": "healthy" if redis_healthy else "degraded",
        "redis": "healthy" if redis_healthy else "unhealthy"
    }