Created
October 7, 2014 13:00
-
-
Save stavinsky/01cc4d69cf872ceca75e to your computer and use it in GitHub Desktop.
cherrypy app engine example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
application: app | |
version: 1 | |
runtime: python27 | |
api_version: 1 | |
threadsafe: yes | |
handlers: | |
- url: /favicon\.ico | |
static_files: favicon.ico | |
upload: favicon\.ico | |
- url: .* | |
script: main.app | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
sys.path.insert(0, 'cherrypy.zip') | |
import cherrypy | |
class Root(object): | |
@cherrypy.expose() | |
def index(self): | |
return "Hello CherryPy world better way" | |
cherrypy.server.unsubscribe() | |
app = cherrypy.tree.mount(Root()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment