mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Modernize CherryPy example
This commit is contained in:
parent
e549835c54
commit
6dbbaa595b
@ -1,10 +1,11 @@
|
||||
import cherrypy
|
||||
|
||||
|
||||
class Root(object):
|
||||
@cherrypy.expose
|
||||
def index(self):
|
||||
return 'Hello World!'
|
||||
|
||||
cherrypy.config.update({'environment': 'embedded'})
|
||||
|
||||
class Root(object):
|
||||
def index(self):
|
||||
return 'Hello World!'
|
||||
index.exposed = True
|
||||
|
||||
app = cherrypy.Application(Root(), script_name=None, config=None)
|
||||
app = cherrypy.tree.mount(Root())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user