I'm having trouble writing a uWSGI entry point file that will load flask-bootstrap sample as my app is not structured to start from if name == "main": I'm just trying to use the flask-bootstrap example files which has a different Flask app.py where it calls a another file to run the if name part. My current uWSGI entry point file looks like:
from myproject import app
if __name__ == "__main__":
app.run()
to serve my app but I believe I might need to structure it differently since my app.py file is not written this way.
My Flask app.py looks like this:
import sys
sys.path.append(os.path.dirname(__name__))
from sample_application import create_app
app = create_app()
app.run(host='0.0.0.0')
I'm following this tutorial: https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uswgi-and-nginx-on-ubuntu-18-04