I am using the following snippet at the end of my Flask app's app.py file on my local dev environment:
if __name__ == '__main__':
app.secret_key = 'SECRET KEY'
app.run(port=5001, debug=True)
I would need to add the app.secret_key = 'SECRET KEY'
line to my production app, but I'm not sure where should I place it since my PA Flask app doesn't use the if __name__ == '__main__':
condition. Is it ok if I just add it to the end of my app.py file? Or is there any other recommended solution? This code is needed to setup the Flask-Session sessions. I would really appreciate if somebody could confirm me that I am doing the right solution or not.