我正在构建一个 Flask-SQL Alchemy 应用程序。首先,我使用 VSC 在本地调试它,一切正常。我可以通过 http://127.0.0.1:5000/healthcheck
访问这两条路线我有两条路线: (1)
# Healthcheck route to confirm that the app is running correctly.
from flask import Blueprint, jsonify, request
blueprint = Blueprint('healthcheck_blueprint', __name__)
@blueprint.route('/healthcheck', methods=['GET'])
def health_check():
return jsonify({"status": "The App is up and running =;)"}), 200
和(2):
# Healthcheck route to confirm that the app is running correctly.
from flask import Blueprint, jsonify, request
blueprint = Blueprint('tree_blueprint', __name__)
@blueprint.route('/tree/view', methods=['GET'])
def health_check():
return jsonify({"status": "Tree"}), 200
当我在本地运行应用程序时,一切都很好,并且两条路线都可以访问。
当我部署到 Azure Devops 时,仅 (1) 有效,而在 (2) 上我收到 404 错误。 网址为 https://[xxxxx].azurewebsites.net//healthcheck 似乎由于某种原因我无法添加任何新路线。
注意:他们在Azure上的部署是成功的。
[更新] 我注意到其他一些更改也没有反映出来,尽管我可以在 Azure 存储库中看到它们。会不会是缓存问题?
非常感谢任何想法。 BR PK
问题似乎与路由注册无关,因为当我尝试部署其他更改时,它们也没有反映出来。