Spaces:
Sleeping
Sleeping
- never give up accessing static file
Browse files- backend/app.py +4 -6
backend/app.py
CHANGED
|
@@ -179,12 +179,10 @@ async def chat_endpoint(websocket: WebSocket, username: str):
|
|
| 179 |
del clients[username]
|
| 180 |
await broadcast_user_list()
|
| 181 |
|
| 182 |
-
@app.get("/frontend
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
return FileResponse(full_path)
|
| 187 |
-
return {"error": "File not found"}
|
| 188 |
|
| 189 |
if __name__ == "__main__":
|
| 190 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|
|
|
|
| 179 |
del clients[username]
|
| 180 |
await broadcast_user_list()
|
| 181 |
|
| 182 |
+
@app.get("/frontend")
|
| 183 |
+
def read_root():
|
| 184 |
+
print("frontend")
|
| 185 |
+
return FileResponse("frontend/index.html")
|
|
|
|
|
|
|
| 186 |
|
| 187 |
if __name__ == "__main__":
|
| 188 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|