get debug mode from env variables when starting wsgi server

This commit is contained in:
nobohan 2022-05-30 14:37:35 +02:00
parent 2e0c7e897e
commit 2a2f8a0874

View File

@ -13,5 +13,5 @@ app = get_app(config)
port = app.config["API_PORT"] if app.config.get("API_PORT", False) else 5002 port = app.config["API_PORT"] if app.config.get("API_PORT", False) else 5002
if __name__ == "__main__": if __name__ == "__main__":
app.debug = True app.debug = app.config.get("DEBUG", False)
app.run(host="0.0.0.0", port=port) app.run(host="0.0.0.0", port=port)