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
The set
command works but to setup the environment, you need to make sure that you are in the right directory where the file is located. For example, if my application is hello_world.py
and it is located at the venv\hello\hello_world.py
, you need to make sure that you are in the right directory before setting up set FLASK_APP=hello_world.py
this is for windows but in another OS, you need to use export
instead set
(venv) C:\Users\myProjects\venv\hello\set FLASK_APP=hello_world.py