2014-10-01 3 views
3

병 (파이썬) 프레임 작업으로 작성된 웹 응용 프로그램이 있는데 데몬 모드로 실행하고 싶습니다. 데몬 모드에서 실행할 수있는 방법이 있습니까데몬 모드에서 병 응용 프로그램을 실행할 수있는 방법이 있습니까

감사합니다.

+4

당신은 사용할 수 있습니다 ['supervisord'] (http://supervisord.org/) 디먼 화 및 제어 병. [이 기사] (http://jamie.curle.io/blog/bottle-and-supervisord/)를 참조하십시오. –

답변

2

물론 가능합니다. 당신의 OS에 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() 
+0

예, 데몬 모드에서 실행하는 것과 동일한 작업을 수행했습니다. – AshokGK