dragxd / server.py
xdragxt's picture
Update server.py
9a1232a verified
raw
history blame contribute delete
371 Bytes
import os
import uvicorn
from fastapi import FastAPI
app = FastAPI(docs_url=None, redoc_url="/")
@app.get("/status")
def hello():
return {"message": "running"}
if __name__ == "__main__":
port = int(os.environ.get("PORT", 7860)) # Use HF Spaces port if provided
print(f"πŸš€ Starting server on port {port}")
uvicorn.run(app, host="0.0.0.0", port=port)