2004-12-30 | paulb | file changeset files shortlog | [project @ 2004-12-30 02:03:30 by paulb] Added another example application. |
paulb@30 | 1 | #!/usr/bin/env python |
paulb@30 | 2 | |
paulb@30 | 3 | from WebStack.Adapters import BaseHTTPRequestHandler |
paulb@30 | 4 | from Configurator import ConfiguratorResource |
paulb@30 | 5 | import BaseHTTPServer |
paulb@30 | 6 | |
paulb@30 | 7 | # Special magic incantation. |
paulb@30 | 8 | |
paulb@30 | 9 | handler = BaseHTTPRequestHandler.HandlerFactory(ConfiguratorResource()) |
paulb@30 | 10 | address = ("", 8080) |
paulb@30 | 11 | server = BaseHTTPServer.HTTPServer(address, handler) |
paulb@30 | 12 | print "Serving..." |
paulb@30 | 13 | server.serve_forever() |
paulb@30 | 14 | |
paulb@30 | 15 | # vim: tabstop=4 expandtab shiftwidth=4 |