How to run a flask application?

前端 未结 4 1160
傲寒
傲寒 2020-11-27 04:52

I want to know the correct way to start a flask application. The docs show two different commands:

$ flask -a sampl         


        
4条回答
  •  忘掉有多难
    2020-11-27 05:07

    For Linux/Unix/MacOS :-

    export FLASK_APP = sample.py
    flask run
    

    For Windows :-

    python sample.py
          OR
    set FLASK_APP = sample.py
    flask run
    

提交回复
热议问题