23 lines
549 B
Python
23 lines
549 B
Python
from pathlib import Path
|
|
|
|
from fastapi import FastAPI
|
|
from fastapi.staticfiles import StaticFiles
|
|
|
|
from .routes import apps, backups, deployments, health
|
|
|
|
|
|
def create_app() -> FastAPI:
|
|
app = FastAPI(title="AppFactory Portal")
|
|
|
|
static_dir = Path(__file__).parent / "static"
|
|
app.mount("/static", StaticFiles(directory=static_dir), name="static")
|
|
|
|
app.include_router(health.router)
|
|
app.include_router(apps.router)
|
|
app.include_router(backups.router)
|
|
app.include_router(deployments.router)
|
|
|
|
return app
|
|
|
|
|
|
app = create_app() |