This commit is contained in:
Kovid Goyal 2012-01-07 12:28:10 +05:30
parent 446eb08a55
commit 8f38433a26

View File

@ -138,6 +138,10 @@ class Handler(SimpleHTTPServer.SimpleHTTPRequestHandler): # {{{
class HTTPD(SocketServer.TCPServer): class HTTPD(SocketServer.TCPServer):
allow_reuse_address = True allow_reuse_address = True
# }}}
compile_coffeescript = Compiler()
def serve(resources={}, port=8000): def serve(resources={}, port=8000):
Handler.special_resources = resources Handler.special_resources = resources
httpd = HTTPD(('0.0.0.0', port), Handler) httpd = HTTPD(('0.0.0.0', port), Handler)
@ -146,9 +150,6 @@ def serve(resources={}, port=8000):
httpd.serve_forever() httpd.serve_forever()
except KeyboardInterrupt: except KeyboardInterrupt:
raise SystemExit(0) raise SystemExit(0)
# }}}
compile_coffeescript = Compiler()
def main(): def main():
import argparse import argparse