Spaces:
Running
Running
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import FastAPI
|
| 2 |
+
from fastapi.staticfiles import StaticFiles
|
| 3 |
+
from fastapi.responses import RedirectResponse
|
| 4 |
+
|
| 5 |
+
app = FastAPI()
|
| 6 |
+
|
| 7 |
+
# Servir les fichiers statiques (HTML, CSS, JS)
|
| 8 |
+
app.mount("/static", StaticFiles(directory="static", html=True), name="static")
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
@app.get("/")
|
| 12 |
+
async def root():
|
| 13 |
+
return RedirectResponse(url="/static/principal.html")
|