Skip to content

Commit

Permalink
Modernize CherryPy example
Browse files Browse the repository at this point in the history
  • Loading branch information
berkerpeksag committed Sep 17, 2016
1 parent 40b40f6 commit 78bb8bc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/frameworks/cherryapp.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import cherrypy

cherrypy.config.update({'environment': 'embedded'})

class Root(object):
@cherrypy.expose
def index(self):
return 'Hello World!'
index.exposed = True

app = cherrypy.Application(Root(), script_name=None, config=None)
cherrypy.config.update({'environment': 'embedded'})

app = cherrypy.tree.mount(Root())

0 comments on commit 78bb8bc

Please sign in to comment.