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 FileResponse
|
| 4 |
+
|
| 5 |
+
app = FastAPI()
|
| 6 |
+
|
| 7 |
+
# /file γιηγγ£γ¬γ―γγͺγ¨γγ¦γγ¦γ³γ
|
| 8 |
+
app.mount("/file", StaticFiles(directory="file"), name="file")
|
| 9 |
+
|
| 10 |
+
# γ«γΌγγ«γ’γ―γ»γΉγγγ /file/index.html γθΏγ
|
| 11 |
+
@app.get("/")
|
| 12 |
+
def read_root():
|
| 13 |
+
return FileResponse("file/index.html")
|