WebStack

examples/Twisted/AuthApp.py

265:fa704545909e
2004-09-18 paulb [project @ 2004-09-18 17:31:40 by paulb] Added start-up message.
     1 #!/usr/bin/env python     2      3 from WebStack.Adapters import Twisted     4 from Auth import AuthResource, AuthAuthenticator     5 import twisted.web.server     6 import twisted.internet.reactor     7      8 # Special magic incantation.     9     10 top_level = Twisted.Dispatcher(AuthResource(), AuthAuthenticator())    11 site = twisted.web.server.Site(top_level)    12 twisted.internet.reactor.listenTCP(8080, site)    13 print "Serving..."    14 twisted.internet.reactor.run()    15     16 # vim: tabstop=4 expandtab shiftwidth=4