| from flask import Flask, render_template, send_from_directory | |
| import os | |
| app = Flask(__name__, static_folder='static', template_folder='templates') | |
| # Configure Jinja2 to use different delimiters to avoid conflict with Vue.js | |
| app.jinja_env.variable_start_string = '[[' | |
| app.jinja_env.variable_end_string = ']]' | |
| app.jinja_env.block_start_string = '[%' | |
| app.jinja_env.block_end_string = '%]' | |
| app.jinja_env.comment_start_string = '[#' | |
| app.jinja_env.comment_end_string = '#]' | |
| def index(): | |
| return render_template('index.html') | |
| def serve_static(path): | |
| return send_from_directory('static', path) | |
| if __name__ == '__main__': | |
| app.run(debug=True, host='0.0.0.0', port=7860) | |