Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -37,13 +37,13 @@ app.add_middleware(
|
|
| 37 |
)
|
| 38 |
|
| 39 |
app.mount("/static", StaticFiles(directory = "static"), name = "static")
|
| 40 |
-
LANDING_FILE_PATH = os.path.join("static", "
|
| 41 |
INDEX_FILE_PATH = os.path.join("static", "index.html")
|
| 42 |
|
| 43 |
@app.get("/", response_class=FileResponse)
|
| 44 |
async def landing_page():
|
| 45 |
if not os.path.exists(LANDING_FILE_PATH):
|
| 46 |
-
return HTMLResponse("
|
| 47 |
return FileResponse(LANDING_FILE_PATH)
|
| 48 |
|
| 49 |
@app.get("/app", response_class=FileResponse)
|
|
|
|
| 37 |
)
|
| 38 |
|
| 39 |
app.mount("/static", StaticFiles(directory = "static"), name = "static")
|
| 40 |
+
LANDING_FILE_PATH = os.path.join("static", "landingpage.html")
|
| 41 |
INDEX_FILE_PATH = os.path.join("static", "index.html")
|
| 42 |
|
| 43 |
@app.get("/", response_class=FileResponse)
|
| 44 |
async def landing_page():
|
| 45 |
if not os.path.exists(LANDING_FILE_PATH):
|
| 46 |
+
return HTMLResponse("landingpage.html missing", status_code=404)
|
| 47 |
return FileResponse(LANDING_FILE_PATH)
|
| 48 |
|
| 49 |
@app.get("/app", response_class=FileResponse)
|