Speed up development with full-stack environments for every branch.

Learn More

Basic TurboGears Example [Python]

Forked from Basic Flask Example.

9071 Runs 13029 Views 548 Copies


amol 16

published 4 years ago

from wsgiref.simple_server import make_server
from tg import expose, TGController, AppConfig

class RootController(TGController):
     def index(self):
         return "<h1>Hello World</h1>"

config = AppConfig(minimal=True, root_controller=RootController())

print "Serving on port 80..."
httpd = make_server('', 80, config.make_wsgi_app())
Please login/signup to get access to the terminal.

Your session has timed out.

Dismiss (the page may not function properly).