CherryPy Project Download

I got cherrypy to run as a daemon finally.

using the Daemonizer plugin. I heard about the plugin in a comment at

http://groups.google.com/group/cherrypy-users/browse_thread/thread/89e62bd4f9414acd/0f00d5d67c1d99c5?#0f00d5d67c1d99c5

I'm using CherryPy 3.1.0 and the following seems to work well.

import cherrypy
from cherrypy.process.plugins import Daemonizer
Daemonizer(cherrypy.engine).subscribe()

class HelloWorld:
    def index(self):
        return "Hello world!"
    index.exposed = True

cherrypy.quickstart(HelloWorld(), '/', 'cherrypy.conf')

my cherrpy.conf file is nothing complication.. just

[global]
server.environment = 'production'
server.socket_host = '0.0.0.0'
server.socket_port = 80
server.thread_pool = 10
tools.sessions.on = True

I kept it short and sweet for clarity.

any other people using this technique?

how about logging/redirecting output to a file?

any corrections/improvements to my code?

Hosted by WebFaction

Log in as guest/cherrypy to create/edit wiki pages