How to set up a Run configuration for flask App in Pycharm Community on Windows? I found Flask.exe for Flask after installing on venv/Script but yet there should be a way to execute it using a Flask Python script to make it work with the default Python Run configuration.
Asked
Active
Viewed 8,074 times
2 Answers
1
Add the following to your Python file where the Flask app is defined:
if __name__ == '__main__':
app.run()
And setup your configuration to run that script.
You can read more about this method of running flask app in the docs. Remember that it is not a suitable way to run Flask apps in production (and neither is flask.exe).

Mikhail Burshteyn
- 4,762
- 14
- 27