鍍金池/ 問(wèn)答/Python  網(wǎng)絡(luò)安全/ 使用Gunicorn部署python flask時(shí)為什么每次都需要重啟才能看到效

使用Gunicorn部署python flask時(shí)為什么每次都需要重啟才能看到效果?

使用以下命令在ubuntu 啟動(dòng)flask應(yīng)用
gunicorn --workers=2 hello:app -b 0.0.0.0:80
但是以上命令無(wú)法使應(yīng)用即時(shí)生效,每次都需要重啟才看到修改后的效果,需要怎么做才能不重啟直接刷新就可以看到效果?

回答
編輯回答
心上人

19.0 以上的版本可以添加 --reload 參數(shù)

https://stackoverflow.com/que...

2017年11月15日 20:08