feat: scaffold travel-memories Flask app and test infrastructure
Adds services/travel-memories/ with Flask factory (create_app), stub route blueprints, pytest/playwright smoke test infra (httpserver session fix, pytest.ini pythonpath), phase2–6 fixture JSONs, Dockerfile, and docker-compose service entry. Smoke test (test_health) passes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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, proxy, notes, nav
|
||||
app.register_blueprint(albums.bp)
|
||||
app.register_blueprint(proxy.bp)
|
||||
app.register_blueprint(notes.bp)
|
||||
app.register_blueprint(nav.bp)
|
||||
|
||||
@app.get("/health")
|
||||
def health():
|
||||
return {"ok": True}
|
||||
|
||||
return app
|
||||
@@ -0,0 +1,3 @@
|
||||
from flask import Blueprint
|
||||
|
||||
bp = Blueprint("albums", __name__)
|
||||
@@ -0,0 +1,3 @@
|
||||
from flask import Blueprint
|
||||
|
||||
bp = Blueprint("nav", __name__)
|
||||
@@ -0,0 +1,3 @@
|
||||
from flask import Blueprint
|
||||
|
||||
bp = Blueprint("notes", __name__)
|
||||
@@ -0,0 +1,3 @@
|
||||
from flask import Blueprint
|
||||
|
||||
bp = Blueprint("proxy", __name__)
|
||||
Reference in New Issue
Block a user