Refactor LED control UI to Vue3
This commit is contained in:
@@ -1,18 +1,26 @@
|
||||
from fastapi import FastAPI
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
from starlette.responses import Response
|
||||
|
||||
from led_platform.api.http import STATIC_DIR, router as http_router
|
||||
from led_platform.api.ws import router as ws_router
|
||||
from led_platform.core.config import get_settings
|
||||
|
||||
|
||||
class NoCacheStaticFiles(StaticFiles):
|
||||
async def get_response(self, path: str, scope: dict) -> Response:
|
||||
response = await super().get_response(path, scope)
|
||||
response.headers["Cache-Control"] = "no-store"
|
||||
return response
|
||||
|
||||
|
||||
def create_app() -> FastAPI:
|
||||
app = FastAPI(
|
||||
title="LED Wall Projection Platform",
|
||||
version="1.0.0",
|
||||
description="Tile-aware dual GPU-server LED wall control and synchronization platform.",
|
||||
)
|
||||
app.mount("/static", StaticFiles(directory=STATIC_DIR), name="static")
|
||||
app.mount("/static", NoCacheStaticFiles(directory=STATIC_DIR), name="static")
|
||||
app.include_router(http_router)
|
||||
app.include_router(ws_router)
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user