Mercurial > bugzilla-dashboard
view server.py @ 93:00d23d6d41b4
made cache module into cache/html5 and a factory function.
author | Atul Varma <avarma@mozilla.com> |
---|---|
date | Mon, 26 Apr 2010 19:02:23 -0700 |
parents | 392fd25a6e21 |
children |
line wrap: on
line source
import os import BaseHTTPServer import SimpleHTTPServer PORT = 8000 def run(server_class=BaseHTTPServer.HTTPServer, handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler, port=PORT): server_address = ('', port) print "Serving files in '%s' on port %d." % (os.getcwd(), port) httpd = server_class(server_address, handler_class) httpd.serve_forever() if __name__ == '__main__': run()