24 lines
553 B
Python
24 lines
553 B
Python
from fastapi import FastAPI
|
|
|
|
from app.config import get_settings
|
|
from app.routers import api_router
|
|
|
|
|
|
def create_app() -> FastAPI:
|
|
settings = get_settings()
|
|
app = FastAPI(
|
|
title=settings.app_name,
|
|
version="0.1.0",
|
|
description="HTTP API for RF visibility, terrain profiles, coverage, and link budget.",
|
|
)
|
|
|
|
@app.get("/health", tags=["health"])
|
|
def health() -> dict[str, str]:
|
|
return {"status": "ok"}
|
|
|
|
app.include_router(api_router, prefix=settings.api_v1_prefix)
|
|
return app
|
|
|
|
|
|
app = create_app()
|