main.py 349 字节
Newer Older
1
from flask import Flask, jsonify, render_template, request
Y
Yu Yang 已提交
2
import os
3 4 5 6 7 8 9

# webapp
app = Flask(__name__)


@app.route('/')
def main():
Y
Yu Yang 已提交
10 11
    backend_url = os.getenv('BACKEND_URL', 'http://localhost:8000/')
    return render_template('index.html', backend_url=backend_url)
12 13 14 15


if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000, threaded=True)