How to setup environment variables for `flask run` on Windows?

前端 未结 14 1882
囚心锁ツ
囚心锁ツ 2021-02-04 10:19

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

14条回答
  •  失恋的感觉
    2021-02-04 10:50

    hope this could help someone, first set flask env like this inside the python virtual env (for windows command prompt)

    set FLASK_ENV = development
    

    then

    set FLASK_APP = app.py 
    

    (app.py should be your flask application file)

提交回复
热议问题