Created
November 23, 2009 04:58
-
-
Save amcgregor/240887 to your computer and use it in GitHub Desktop.
Minimal WebCore application.
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 web.core | |
from paste import httpserver | |
class RootController(web.core.Controller): | |
def index(self): | |
return 'Hello world!' | |
def hello(self, name): | |
return "Hello, %(name)s!" % dict(name=name) | |
app = web.core.Application.factory(root=RootController, debug=False) | |
httpserver.serve(app, host='127.0.0.1', port='8080') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment