Spaces:
Sleeping
Sleeping
from fastapi import FastAPI | |
from src.api import router | |
from src.core.utils import logger, read_config | |
def init_routers(app_: FastAPI) -> None: | |
app_.include_router(router) | |
def create_app() -> FastAPI: | |
config = read_config("config.yaml") | |
app_ = FastAPI( | |
title="Franky API", | |
description="In Development", | |
version="1.0.0", | |
) | |
app_.state.config = config | |
init_routers(app_=app_) | |
logger.info("Server started successfully", log_type="server", console=True) | |
return app_ | |
app = create_app() | |