1.建立Flask APP

from flask import Flask, render_template
app = Flask(__name__)


@app.route("/")
def home():
return render_template('home.html')


if __name__ == '__main__':
app.run(debug=True)

2.使用Frozen-Flask靜態化Flask

from flask_frozen import Freezer
from myapp import app #依照第一步驟的檔名來決定

freezer = Freezer(app)

if __name__ == '__main__':
freezer.freeze()

Written by

Machine Learning / Deep Learning / Python / Flutter cakeresume.com/yanwei-liu

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store