18 lines
416 B
Python
18 lines
416 B
Python
from fastapi import FastAPI
|
|
|
|
from app.api.v1.router import api_router
|
|
from app.core.config import settings
|
|
|
|
app = FastAPI(
|
|
title=settings.PROJECT_NAME,
|
|
version=settings.VERSION, # Versioning dell'app
|
|
)
|
|
|
|
# Montiamo le rotte sotto il prefisso /api/v1
|
|
app.include_router(api_router, prefix=settings.API_V1_STR)
|
|
|
|
|
|
@app.get("/health")
|
|
def health_check():
|
|
return {"status": "ok", "version": settings.VERSION}
|