Hello, World!
Mode: {mode}
Version: {version}
from pathlib import Path from flask import Flask, request app = Flask(__name__) LIVE = Path("livez") LIVE.write_text("ok") @app.route("/") def hello_world(): version = "v3" if "5000" in request.base_url: mode = "local" header_color = "#a0dfa0" elif "30001" in request.base_url: mode = "active" header_color = "#a0c0df" elif "30002" in request.base_url: mode = "preview" header_color = "#dfa0df" else: mode = "unknown" header_color = "#dfc0a0" import time LIVE.write_text("no") time.sleep(10) LIVE.write_text("ok") return f"""
Mode: {mode}
Version: {version}