release v1.1
This commit is contained in:
@@ -37,13 +37,6 @@ def getLogs():
|
|||||||
return "".join(reversed(last_lines))
|
return "".join(reversed(last_lines))
|
||||||
|
|
||||||
|
|
||||||
@app.before_request
|
|
||||||
def init():
|
|
||||||
db.create_all()
|
|
||||||
enable_publish_job()
|
|
||||||
logger.info("Приложение запущено")
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/", methods=["GET", "POST"])
|
@app.route("/", methods=["GET", "POST"])
|
||||||
def index():
|
def index():
|
||||||
match request.method:
|
match request.method:
|
||||||
@@ -417,6 +410,13 @@ def api_posts():
|
|||||||
return jsonify({"status": "error"}), 405
|
return jsonify({"status": "error"}), 405
|
||||||
|
|
||||||
|
|
||||||
|
def init_app():
|
||||||
|
with app.app_context():
|
||||||
|
db.create_all()
|
||||||
|
enable_publish_job()
|
||||||
|
logger.info("Приложение запущено")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# app.run(debug=True)
|
init_app()
|
||||||
app.run(debug=True, host="0.0.0.0", port=80)
|
app.run(debug=True, host="0.0.0.0", port=80)
|
||||||
|
|||||||
Reference in New Issue
Block a user