Files
dp/led_platform/main.py
T
2026-07-16 08:31:52 +08:00

33 lines
849 B
Python

from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
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
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.include_router(http_router)
app.include_router(ws_router)
return app
app = create_app()
def main() -> None:
import uvicorn
settings = get_settings()
uvicorn.run("led_platform.main:app", host=settings.app_host, port=settings.app_port)
if __name__ == "__main__":
main()