2004-12-20 | paulb | file changeset files shortlog | [project @ 2004-12-20 21:05:10 by paulb] Added notes on JythonServlet configuration. Updated Twisted notes. |
paulb@240 | 1 | #!/usr/bin/env python |
paulb@240 | 2 | |
paulb@240 | 3 | from WebStack.Adapters import BaseHTTPRequestHandler |
paulb@240 | 4 | from Sessions import SessionsResource |
paulb@240 | 5 | import BaseHTTPServer |
paulb@240 | 6 | |
paulb@240 | 7 | # Special magic incantation. |
paulb@240 | 8 | |
paulb@240 | 9 | handler = BaseHTTPRequestHandler.HandlerFactory(SessionsResource()) |
paulb@240 | 10 | address = ("", 8080) |
paulb@240 | 11 | server = BaseHTTPServer.HTTPServer(address, handler) |
paulb@265 | 12 | print "Serving..." |
paulb@240 | 13 | server.serve_forever() |
paulb@240 | 14 | |
paulb@240 | 15 | # vim: tabstop=4 expandtab shiftwidth=4 |