feat: scaffold backend with FastAPI, config files, and health endpoint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 08:04:13 +00:00
parent c393f76563
commit f1c20c0461
7 changed files with 69 additions and 0 deletions

25
backend/main.py Normal file
View File

@@ -0,0 +1,25 @@
from contextlib import asynccontextmanager
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
@asynccontextmanager
async def lifespan(app: FastAPI):
# Startup
yield
# Shutdown
app = FastAPI(title="TV Dashboard API", lifespan=lifespan)
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_methods=["*"],
allow_headers=["*"],
)
@app.get("/api/health")
async def health():
return {"status": "ok"}