Spaces:
Sleeping
Sleeping
Delete app.py
Browse files
app.py
DELETED
|
@@ -1,23 +0,0 @@
|
|
| 1 |
-
from fastapi import FastAPI
|
| 2 |
-
from fastapi.responses import FileResponse
|
| 3 |
-
from fastapi.staticfiles import StaticFiles
|
| 4 |
-
|
| 5 |
-
app = FastAPI()
|
| 6 |
-
|
| 7 |
-
# API testowe (opcjonalne)
|
| 8 |
-
@app.get("/api/ping")
|
| 9 |
-
def ping():
|
| 10 |
-
return {"ok": True}
|
| 11 |
-
|
| 12 |
-
# Pliki statyczne: wszystko z folderu 'static' b臋dzie pod /static/...
|
| 13 |
-
app.mount("/static", StaticFiles(directory="static"), name="static")
|
| 14 |
-
|
| 15 |
-
# Strona g艂贸wna: / -> static/index.html
|
| 16 |
-
@app.get("/")
|
| 17 |
-
def home():
|
| 18 |
-
return FileResponse("static/index.html")
|
| 19 |
-
|
| 20 |
-
# Polityka prywatno艣ci: /polityka-prywatnosci -> static/polityka-prywatnosci.html
|
| 21 |
-
@app.get("/polityka-prywatnosci")
|
| 22 |
-
def privacy():
|
| 23 |
-
return FileResponse(BASE / "static" / "privacy-policy.html") # << ta nazwa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|