Hi everyone,
I try to run Flask with gunicorn
I've created a venv , here the simple structure
Running Flask_test.py with the embedded dev. server is running smoothly
now with gunicorn...
All around the www I see that I need to create another .py file and call this one that will call Flask_test.py
why so many redirection ?
is there a way to launch unicorn with Flask_test.py directly ?
Thanks.
Edit:
With waitress I could launch it like this
and in Flask_test.py I would have:
I try to run Flask with gunicorn

I've created a venv , here the simple structure
Quote:.
├── bin
├── include
├── lib
├── lib64 -> lib
├── __pycache__
├── share
├── Flask_test.py
└── pyvenv.cfg
Running Flask_test.py with the embedded dev. server is running smoothly
#Flask_test.py from flask import Flask app = Flask(__name__) @app.route("/") def hello_world(): return "<p>Hello, <b>World!</b></p>" if __name__ == "__main__": #app.run(host, port, debug, options) app.run('127.0.0.1',5000,True)
now with gunicorn...
All around the www I see that I need to create another .py file and call this one that will call Flask_test.py

is there a way to launch unicorn with Flask_test.py directly ?
Thanks.
Edit:
With waitress I could launch it like this
Python3.9 Flask_test.py
and in Flask_test.py I would have:
from waitress import serve #....... if __name__ == "__main__": serve(app, host='127.0.0.1', port=5000, ipv6=False)so simple...
![[Image: NfRQr9R.jpg]](https://i.imgur.com/NfRQr9R.jpg)