CodexWebVM / backend.py
LordXido's picture
Create backend.py
863f7a5 verified
raw
history blame contribute delete
324 Bytes
from fastapi import FastAPI
from fastapi.responses import HTMLResponse
from fastapi.staticfiles import StaticFiles
app = FastAPI()
app.mount("/static", StaticFiles(directory=".", html=True), name="static")
@app.get("/", response_class=HTMLResponse)
def root():
with open("index.html","r") as f:
return f.read()