Permalink
Browse files

Modernize CherryPy example

  • Loading branch information...
1 parent e549835 commit 6dbbaa595b7db1b15431969d5ca80640a33f4506 @berkerpeksag berkerpeksag committed Sep 17, 2016
Showing with 4 additions and 3 deletions.
  1. +4 −3 examples/frameworks/cherryapp.py
@@ -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 6dbbaa5

Please sign in to comment.