diff --git a/backend/app/main.py b/backend/app/main.py index ff5bfdb..6417ee2 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -3,7 +3,7 @@ TicketHub - Lightweight Issue Tracking System """ from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware -from fastapi.staticfiles import StaticFiles +from fastapi.responses import HTMLResponse from contextlib import asynccontextmanager import os @@ -36,6 +36,18 @@ app.include_router(projects.router, prefix="/api/projects", tags=["projects"]) app.include_router(tickets.router, prefix="/api/tickets", tags=["tickets"]) app.include_router(webhooks.router, prefix="/api/webhooks", tags=["webhooks"]) -# Serve frontend -if os.path.exists("/app/static"): - app.mount("/", StaticFiles(directory="/app/static", html=True), name="static") +# Serve embedded frontend +HTML = """ +TicketHub + +
🎫

TicketHub

+

Projects

+

Tickets

Select a project
+ + + +""" + +@app.get("/", response_class=HTMLResponse) +async def root(): + return HTML