mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-02-20 07:59:50 -05:00
20 lines
463 B
Python
20 lines
463 B
Python
import os
|
|
|
|
from app.tmdb import router as tmdb_router
|
|
from app.tvdb import router as tvdb_router
|
|
from fastapi import FastAPI
|
|
from starlette_exporter import PrometheusMiddleware, handle_metrics
|
|
|
|
app = FastAPI(root_path=os.getenv("BASE_PATH"))
|
|
|
|
app.add_middleware(PrometheusMiddleware)
|
|
app.add_route("/metrics", handle_metrics)
|
|
|
|
app.include_router(tmdb_router)
|
|
app.include_router(tvdb_router)
|
|
|
|
|
|
@app.get("/")
|
|
async def root():
|
|
return {"message": "Hello World"}
|