diff --git a/src/app/main.py b/src/app/main.py index 392823c..9735285 100644 --- a/src/app/main.py +++ b/src/app/main.py @@ -4,9 +4,24 @@ from sqlalchemy.orm import Session from app.database import SessionLocal, engine from app import models, schemas -models.Base.metadata.create_all(bind=engine) +from typing import List, Optional +# ddfrom starlette.middleware.base import BaseHTTPMiddleware +# from starlette.responses import Response + +# class CustomMIMEMiddleware(BaseHTTPMiddleware): +# async def dispatch(self, request, call_next): +# response = await call_next(request) +# if request.url.path.endswith('.vue'): +# response.headers['Content-Type'] = 'application/javascript' +# return response + +from fastapi.staticfiles import StaticFiles + app = FastAPI() +app.mount("/static", StaticFiles(directory="static"), name="static") + +models.Base.metadata.create_all(bind=engine) def get_db(): db = SessionLocal() diff --git a/src/static/index.html b/src/static/index.html index 91c424e..2f9b441 100644 --- a/src/static/index.html +++ b/src/static/index.html @@ -4,20 +4,13 @@