Spaces:
Sleeping
Sleeping
Claude Code Claude Opus 4.6 commited on
Commit ·
e667222
1
Parent(s): 276c0d6
Claude Code: Fix root endpoint - return correct Cain status with parents
Browse files
app.py
CHANGED
|
@@ -36,7 +36,7 @@ app = FastAPI(title="HuggingClaw - Cain", version="0.0.1", lifespan=lifespan)
|
|
| 36 |
@app.get("/")
|
| 37 |
async def root():
|
| 38 |
"""Root endpoint - simple alive status."""
|
| 39 |
-
return {"status": "
|
| 40 |
|
| 41 |
@app.get("/health")
|
| 42 |
async def health():
|
|
@@ -152,6 +152,7 @@ if __name__ == "__main__":
|
|
| 152 |
try:
|
| 153 |
port = int(os.environ.get('PORT', 7860))
|
| 154 |
print(f">>> CAIN: Starting uvicorn on port {port}...", flush=True)
|
|
|
|
| 155 |
uvicorn.run("app:app", host="0.0.0.0", port=port, log_config=None)
|
| 156 |
except Exception as e:
|
| 157 |
print(f"CRITICAL STARTUP ERROR: {e}", flush=True)
|
|
|
|
| 36 |
@app.get("/")
|
| 37 |
async def root():
|
| 38 |
"""Root endpoint - simple alive status."""
|
| 39 |
+
return {"status": "ok", "agent": "Cain", "parents": ["Adam", "Eve"]}
|
| 40 |
|
| 41 |
@app.get("/health")
|
| 42 |
async def health():
|
|
|
|
| 152 |
try:
|
| 153 |
port = int(os.environ.get('PORT', 7860))
|
| 154 |
print(f">>> CAIN: Starting uvicorn on port {port}...", flush=True)
|
| 155 |
+
print(f'>>> CAIN: uvicorn.run("app:app", host="0.0.0.0", port={port})', flush=True)
|
| 156 |
uvicorn.run("app:app", host="0.0.0.0", port=port, log_config=None)
|
| 157 |
except Exception as e:
|
| 158 |
print(f"CRITICAL STARTUP ERROR: {e}", flush=True)
|