Starting flask server in background

后端 未结 4 1705
感动是毒
感动是毒 2021-02-01 05:13

I have a flask application which I am currently starting up in the following way:

#phantom.py
__author__ = \'uruddarraju\'
from phantom.api.v1 import app
app.run         


        
4条回答
  •  眼角桃花
    2021-02-01 05:46

    $ python phantom.py &
    

    Is probably the easiest way to make it run in the background. That said you should not be using the app.run() server to serve your flask app if you are moving it into production as @LukasGraf mentions (as well as I believe their documentation)

提交回复
热议问题