File size: 524 Bytes
1941764 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | from fastapi import FastAPI
import os
app = FastAPI(title="Todo API - Minimal Test")
@app.get("/")
def root():
return {
"status": "ok",
"message": "Railway FastAPI is working!",
"port": os.getenv("PORT", "not set"),
"database": "connected" if os.getenv("DATABASE_URL") else "not configured"
}
@app.get("/health")
def health():
return {"status": "healthy", "service": "railway-test"}
@app.get("/api/health")
def api_health():
return {"status": "healthy", "api": "working"}
|