init
This commit is contained in:
16
front/__init__.py
Normal file
16
front/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from sys import prefix
|
||||
from fastapi import APIRouter
|
||||
from fastapi.responses import HTMLResponse
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
|
||||
|
||||
def get_frontend() -> APIRouter:
|
||||
router = APIRouter(prefix="")
|
||||
|
||||
@router.get("/", response_class=HTMLResponse)
|
||||
async def index():
|
||||
with open("./static/index.html", "r") as file:
|
||||
content = file.read()
|
||||
return content
|
||||
|
||||
return router
|
||||
Reference in New Issue
Block a user