我使用 flask 来写后端程式
test.py:
from flask import Flask, send_from_directory,url_for
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
@app.route("/report")
def view_report():
url_for('static', filename='report/flexmonkey/html/')
return send_from_directory('static', 'report/flexmonkey/html/index.html')
if __name__ == "__main__":
app.run(debug=True)