import os class Config: # Read values from environment variables or use defaults UPLOAD_FOLDER = os.environ.get("UPLOAD_FOLDER", "/tmp/uploads") HOST = os.environ.get("HOST", "127.0.0.1") PORT = int(os.environ.get("PORT", 5000)) DEBUG = os.environ.get("DEBUG", "False").lower() in ("true", "1") # Ensure upload directory exists if not os.path.exists(Config.UPLOAD_FOLDER): os.makedirs(Config.UPLOAD_FOLDER)