I'm trying to deploy a flask app on a linux server. Currently, I'm testing it I'm try to run it with the following commands.
export FLASK_APP=main.py
flask run --host=0.0.0.0
When I run this and try to navigate to [SERVER IP]:5000, there is a failed connection to the server. I've tried to implement solutions I've found elsewhere such as here:Can't connect to Flask web service, connection refused
I've made these changes and it still does not work:
if __name__ == '__main__':
app.run(host='0.0.0.0',port=5000)
sudo ufw allow 5000
Some information about the server - Through linode running Ubuntu 21.04
Any help would be greatly appreciated.