Deploying CherryPy (daemon)

后端 未结 4 2173
傲寒
傲寒 2020-12-08 15:04

I\'ve followed the basic CherryPy tutorial (http://www.cherrypy.org/wiki/CherryPyTutorial). One thing not discussed is deployment.

How can I launch a CherryPy app a

4条回答
  •  情书的邮戳
    2020-12-08 15:32

    Info on Daemonizer options

    When using Daemonizer, the docs don't state the options, e.g. how to redirect stdout or stderr. From the source of the Daemonizer class you can find the options. As a reference take this example from my project:

    # run server as a daemon
    d = Daemonizer(cherrypy.engine,
                   stdout='/home/pi/Gate/log/gate_access.log',
                   stderr='/home/pi/Gate/log/gate_error.log')
    d.subscribe()
    

提交回复
热议问题