Files
intotheeast-com/services/travel-memories/app/__init__.py
T
2026-06-21 16:54:15 +02:00

26 lines
880 B
Python

import os
from flask import Flask
def create_app(state_dir=None, pages_dir=None):
app = Flask(__name__)
app.config["STATE_DIR"] = state_dir or os.environ.get("STATE_DIR", "/app/state")
app.config["PAGES_DIR"] = pages_dir or os.environ.get("PAGES_DIR", "/app/pages")
app.config["IMMICH_URL"] = os.environ.get("IMMICH_URL", "")
app.config["IMMICH_API_KEY"] = os.environ.get("IMMICH_API_KEY", "")
from .routes import albums, triage, proxy, notes, nav, curate, group, write
app.register_blueprint(albums.bp)
app.register_blueprint(triage.bp)
app.register_blueprint(proxy.bp)
app.register_blueprint(notes.bp)
app.register_blueprint(nav.bp)
app.register_blueprint(curate.bp)
app.register_blueprint(group.bp)
app.register_blueprint(write.bp)
@app.get("/health")
def health():
return {"ok": True}
return app