flask 脚本运行

2019-07-07 15:16:00 浏览数 (1)

from flask import Flask from flask import abort from flask_script import Manager

app = Flask(name) manager = Manager(app)

@app.route('/') def index(): abort(404)

if name == 'main': manager.run()

启动:python d:filepythonflasklearnapp.py runserver --host 0.0.0.0 参数:-t host,-p port,--threaded,--processes xx,-d --no-debug

0 人点赞