LordXido commited on
Commit
863f7a5
·
verified ·
1 Parent(s): e135b5d

Create backend.py

Browse files
Files changed (1) hide show
  1. backend.py +11 -0
backend.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+ from fastapi.responses import HTMLResponse
3
+ from fastapi.staticfiles import StaticFiles
4
+
5
+ app = FastAPI()
6
+ app.mount("/static", StaticFiles(directory=".", html=True), name="static")
7
+
8
+ @app.get("/", response_class=HTMLResponse)
9
+ def root():
10
+ with open("index.html","r") as f:
11
+ return f.read()