Init
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user