use env for more stuff

This commit is contained in:
2026-02-10 20:33:51 +01:00
parent 6e153e5657
commit fcfd2d5662

7
app.py
View File

@@ -695,5 +695,10 @@ def delete_goal(goal_id):
db.goals.delete_one({'_id': ObjectId(goal_id), 'user_id': get_user_id()})
return redirect(url_for('goals'))
debug = os.getenv('DEBUG') == 'False'
host = os.getenv('HOST')
port = int(os.getenv('PORT', 80))
if __name__ == '__main__':
app.run(debug=True)
app.run(debug=False, host=host, port=port)