paulb@53 | 1 | #!/usr/bin/env python |
paulb@53 | 2 | |
paulb@53 | 3 | from WebStack.Adapters import BaseHTTPRequestHandler |
paulb@78 | 4 | from Auth import AuthResource, AuthAuthenticator |
paulb@53 | 5 | import BaseHTTPServer |
paulb@53 | 6 | |
paulb@53 | 7 | # Special magic incantation. |
paulb@53 | 8 | |
paulb@78 | 9 | handler = BaseHTTPRequestHandler.HandlerFactory(AuthResource(), AuthAuthenticator()) |
paulb@53 | 10 | address = ("", 8080) |
paulb@53 | 11 | server = BaseHTTPServer.HTTPServer(address, handler) |
paulb@53 | 12 | server.serve_forever() |
paulb@53 | 13 | |
paulb@53 | 14 | # vim: tabstop=4 expandtab shiftwidth=4 |