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
A step-wise solution is provided below:
Go to the folder where you have placed your flask app (on the command line)
Create a virtual environment as using the command ($ py -m venv env
) here 'venv' is the short form of the virtual environment and 'env' at the end represents the name of the environment which you want (I have named it as env). Thereafter you can see at from the file explorer that a folder named 'env' is created in the folder stated at point #1 above.
Enter the following command ($env\Scripts\activate
) by pressing enter this will turn on your virtual environment
Thereafter, enter the following command ($set FLASK_APP=
)
Enter the following command ($flask run
)