Skip to content

Instantly share code, notes, and snippets.

@amcgregor
Created November 23, 2009 04:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amcgregor/240887 to your computer and use it in GitHub Desktop.
Save amcgregor/240887 to your computer and use it in GitHub Desktop.
Minimal WebCore application.
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