I just started learning flask and I am stuck at setting up the Flask environment variables. I don\'t know how to setup the environment variables. Whenever I use the flask
You need to specify the environment of the application. Like this
export FLASK_APP = application.py
after performing this operation
flask run
But my suggestion is that it will be easier for you to perform these operations there while creating your application, rather than constantly stating this in the terminal. After reviewing the documentation, if you do what I said, it will be enough to come to the terminal and run python app.py runserver
in terminal.
You can check flask's documentation for that. https://flask.palletsprojects.com/en/1.1.x/patterns/appfactories/