diff --git a/artdag-client.tar.gz b/artdag-client.tar.gz new file mode 100644 index 0000000..a4ec7f4 Binary files /dev/null and b/artdag-client.tar.gz differ diff --git a/server.py b/server.py index 91ce35f..1d24567 100644 --- a/server.py +++ b/server.py @@ -28,7 +28,7 @@ logging.basicConfig( logger = logging.getLogger(__name__) from fastapi import FastAPI, HTTPException, Request, Response, Depends, Cookie -from fastapi.responses import JSONResponse, HTMLResponse, RedirectResponse +from fastapi.responses import JSONResponse, HTMLResponse, RedirectResponse, FileResponse from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials from pydantic import BaseModel import requests @@ -319,6 +319,7 @@ def base_html(title: str, content: str, username: str = None) -> str: Activities Users Anchors + Download Client
@@ -2761,6 +2762,22 @@ async def test_ots_connection(): ''') +# ============ Client Download ============ + +CLIENT_TARBALL = Path(__file__).parent / "artdag-client.tar.gz" + +@app.get("/download/client") +async def download_client(): + """Download the Art DAG CLI client.""" + if not CLIENT_TARBALL.exists(): + raise HTTPException(404, "Client package not found") + return FileResponse( + CLIENT_TARBALL, + media_type="application/gzip", + filename="artdag-client.tar.gz" + ) + + if __name__ == "__main__": import uvicorn uvicorn.run("server:app", host="0.0.0.0", port=8200, workers=4)