feat(trip-cluster): config, factory, CLI skeleton, health + thumb proxy
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
from flask import Flask
|
||||
|
||||
from app.config import load_config
|
||||
from photoflow.ui import register_shared_ui
|
||||
|
||||
|
||||
def create_app(config=None) -> Flask:
|
||||
app = Flask(__name__)
|
||||
cfg = config or load_config()
|
||||
app.config["APP_CONFIG"] = cfg
|
||||
app.config["DATA_DIR"] = cfg.data_dir
|
||||
|
||||
register_shared_ui(app)
|
||||
|
||||
from app.routes.nav import bp as nav_bp
|
||||
from app.routes.review import bp as review_bp
|
||||
from app.routes.proxy import bp as proxy_bp
|
||||
app.register_blueprint(nav_bp)
|
||||
app.register_blueprint(review_bp)
|
||||
app.register_blueprint(proxy_bp)
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user