Trae Assistant
Initial commit: Cron Schedule Studio with robust Vue/Flask setup
3ff4c5e
raw
history blame contribute delete
733 Bytes
from flask import Flask, render_template, send_from_directory, request
import os
app = Flask(__name__)
# Config for robustness
app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 # 16MB max upload limit
app.config['TEMPLATES_AUTO_RELOAD'] = True
@app.route('/')
def index():
return render_template('index.html')
@app.route('/static/<path:path>')
def send_static(path):
return send_from_directory('static', path)
@app.route('/health')
def health():
return "OK", 200
if __name__ == '__main__':
port = int(os.environ.get('PORT', 7860))
# Disable debug in production-like environments if needed, but for Spaces it's fine usually.
# We use 0.0.0.0 for external access
app.run(host='0.0.0.0', port=port)