diff --git a/login.html b/login.html new file mode 100644 index 0000000..b867733 --- /dev/null +++ b/login.html @@ -0,0 +1,20 @@ + + + + + + Login - MultiChatOverlay + + + +
+

Welcome to MultiChatOverlay

+

Connect your streaming accounts to get started.

+ Login with Twitch +
+ + \ No newline at end of file diff --git a/main.py b/main.py index c0cffef..986b617 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,7 @@ from fastapi import FastAPI from starlette.middleware.sessions import SessionMiddleware +from starlette.staticfiles import StaticFiles +from starlette.responses import HTMLResponse import models from database import engine @@ -13,6 +15,9 @@ models.Base.metadata.create_all(bind=engine) app = FastAPI() +# Mount the 'static' directory to serve files like login.html +app.mount("/static", StaticFiles(directory="static"), name="static") + # Add the authentication router app.include_router(auth.router) @@ -21,5 +26,6 @@ app.include_router(auth.router) app.add_middleware(SessionMiddleware, secret_key=settings.ENCRYPTION_KEY) @app.get("/") -async def read_root(): - return {"message": "MultiChatOverlay API"} \ No newline at end of file +async def read_root() -> HTMLResponse: + with open("static/login.html") as f: + return HTMLResponse(content=f.read(), status_code=200) \ No newline at end of file