Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,6 +8,12 @@ logger = logging.getLogger("minimal-api")
|
|
| 8 |
|
| 9 |
app = FastAPI(title="Minimal API Test")
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
@app.get("/health")
|
| 12 |
async def health_check():
|
| 13 |
"""Health check endpoint to confirm the app is running"""
|
|
@@ -31,4 +37,4 @@ async def echo(text: str = Form(...)):
|
|
| 31 |
if __name__ == "__main__":
|
| 32 |
import uvicorn
|
| 33 |
logger.info("Starting Uvicorn server...")
|
| 34 |
-
uvicorn.run(app, host="0.0.0.0", port=8000)
|
|
|
|
| 8 |
|
| 9 |
app = FastAPI(title="Minimal API Test")
|
| 10 |
|
| 11 |
+
@app.get("/")
|
| 12 |
+
async def root():
|
| 13 |
+
"""Root endpoint for default health check"""
|
| 14 |
+
logger.info("Root endpoint requested")
|
| 15 |
+
return {"status": "healthy"}
|
| 16 |
+
|
| 17 |
@app.get("/health")
|
| 18 |
async def health_check():
|
| 19 |
"""Health check endpoint to confirm the app is running"""
|
|
|
|
| 37 |
if __name__ == "__main__":
|
| 38 |
import uvicorn
|
| 39 |
logger.info("Starting Uvicorn server...")
|
| 40 |
+
uvicorn.run(app, host="0.0.0.0", port=8000, workers=1)
|