init defaults completed

This commit is contained in:
2024-11-10 20:14:13 +03:00
parent aeda315119
commit c42a19c262
37 changed files with 582 additions and 308 deletions

View File

@@ -5,16 +5,14 @@ from fastapi.exceptions import HTTPException
from middlewares.token_middleware import AuthHeaderMiddleware
from application.create_file import create_app
from application.app_runner_init import create_endpoints_from_api_functions
from handlers_exception import (
exception_handler_http,
exception_handler_exception,
)
from prometheus_fastapi_instrumentator import Instrumentator
# from prometheus_client import Counter, Histogram
import routers
app = create_app()
app = create_app(routers=routers)
Instrumentator().instrument(app=app).expose(app=app)
app.add_middleware(
@@ -30,7 +28,6 @@ app.add_middleware(AuthHeaderMiddleware)
app.add_exception_handler(HTTPException, exception_handler_http)
app.add_exception_handler(Exception, exception_handler_exception)
create_endpoints_from_api_functions(api_app=app)
if __name__ == "__main__":
uvicorn_config = {