INNER CODE UNIT · Python

lifespan

Minituff/nautical-backup · app/api/main.py:18

async def lifespan(app: FastAPI):
    logger = Logger()
    # Steps that will be performed on startup events only once.
    logger.log_this("Starting API on port 8069...", "INFO")
    yield
    # Steps that will happen on shutdown event
    logger = Logger()
    logger.log_this("Shutting down API...", "INFO")


@lru_cache
def get_settings():
    return Settings()


# Mount the directory containing your static files (HTML, CSS, JS) as a static files route.
script_dir = os.path.dirname(__file__)
static_abs_file_path = os.path.join(script_dir, "static/")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…