Always using normal flask app instead of WSGI

Everytime I run or debug in pycharm, it always using the normal method and listening default port. 

 

Module:

from gevent.pywsgi import WSGIServer

 

Execution:

if __name__ == '__main__':
    server = WSGIServer(('0.0.0.0', 8080), app)
    server.serve_forever()  # Run the server

 

Output:

FLASK_APP = app.py
FLASK_ENV = development
FLASK_DEBUG = 0
In folder /home/artha/ArthaCodes/Python codes/toDoListAPI
/usr/bin/python3.10 -m flask run 
 * Serving Flask app 'app.py'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:5000
Press CTRL+C to quit


But if I run it outside Pycharm like terminal,  WSGI works properly.

0
Hi, the port can be changed using additional options in the run configuration https://www.jetbrains.com/help/pycharm/run-debug-configuration-flask-server.html
1

请先登录再写评论。