Awesome-Developer commited on
Commit
553df97
·
verified ·
1 Parent(s): ce09003

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -9
app.py CHANGED
@@ -1,13 +1,9 @@
1
  from fastapi import FastAPI
2
- from fastapi.responses import JSONResponse
3
 
4
  app = FastAPI()
5
 
6
- # This is a public path that doesn't need a Hugging Face token
7
- @app.get("/health-check-vps-77")
8
- def health():
9
- return {"status": "alive", "service": "ollama"}
10
-
11
- @app.get("/")
12
- def root():
13
- return {"message": "VPS is running. Use sshx to connect."}
 
1
  from fastapi import FastAPI
2
+ from fastapi import Request
3
 
4
  app = FastAPI()
5
 
6
+ # This handles GET, HEAD, and everything else
7
+ @app.api_route("/", methods=["GET", "HEAD"])
8
+ def root(request: Request):
9
+ return {"message": "VPS is active", "method": request.method}