paulb@107 | 1 | #!/usr/bin/env python |
paulb@107 | 2 | |
paulb@107 | 3 | from WebStack.Adapters import Twisted |
paulb@107 | 4 | from Cookies import CookiesResource |
paulb@107 | 5 | import twisted.web.server |
paulb@107 | 6 | import twisted.internet.reactor |
paulb@107 | 7 | |
paulb@107 | 8 | # Special magic incantation. |
paulb@107 | 9 | |
paulb@107 | 10 | top_level = Twisted.Dispatcher(CookiesResource()) |
paulb@107 | 11 | site = twisted.web.server.Site(top_level) |
paulb@107 | 12 | twisted.internet.reactor.listenTCP(8080, site) |
paulb@261 | 13 | print "Serving..." |
paulb@107 | 14 | twisted.internet.reactor.run() |
paulb@107 | 15 | |
paulb@107 | 16 | # vim: tabstop=4 expandtab shiftwidth=4 |