Skip to content

Instantly share code, notes, and snippets.

@amcgregor
Created February 18, 2010 08:24
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/307473 to your computer and use it in GitHub Desktop.
Save amcgregor/307473 to your computer and use it in GitHub Desktop.
The starting root controller for the basic WebCore Wiki example.
# encoding: utf-8
"""Web application root controller."""
import web.core
class RootController(web.core.Controller):
def index(self):
return 'Hello world!'
if __name__ == '__main__':
from paste import httpserver
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