我有一个基于 bottle(python) 框架工作的 Web 应用程序,我想在守护进程模式下运行它。有什么办法可以在守护进程模式下运行它
谢谢
最佳答案
当然可以。安装BottleDaemon 0.1.0在你的操作系统上,而不是像这样改变你的路由器文件:
from bottledaemon import daemon_run
from bottle import route
@route("/hello")
def hello():
return "Hello World"
# The following lines will call the BottleDaemon script and launch a daemon in the background.
if __name__ == "__main__":
daemon_run()
关于python - 有没有办法在守护进程模式下运行 Bottle 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26135159/