v1
Some checks failed
CI / test (3.11) (push) Failing after 5m36s
CI / build-image (push) Has been skipped

This commit is contained in:
2025-10-22 16:48:55 +02:00
commit 4cefd4e3ab
53 changed files with 5837 additions and 0 deletions

35
server/app.py Normal file
View File

@@ -0,0 +1,35 @@
"""Compatibility layer exposing the Flask app instance."""
from __future__ import annotations
from pathlib import Path
from .database import (
DB_PATH as _DB_PATH,
DEFAULT_DB_PATH,
db_cursor,
init_db as _init_db,
is_postgres_enabled,
set_db_path,
set_postgres_override,
)
from .factory import create_app
app = create_app()
DB_PATH: Path = _DB_PATH
def init_db() -> None:
"""Initialise the database using the current DB_PATH."""
set_db_path(DB_PATH)
_init_db()
__all__ = [
"app",
"DB_PATH",
"DEFAULT_DB_PATH",
"db_cursor",
"init_db",
"is_postgres_enabled",
"set_postgres_override",
]