mirror of
https://github.com/denoland/deno.git
synced 2025-01-03 12:58:54 -05:00
allow_reuse_address for test http server.
This commit is contained in:
parent
f43259e5ab
commit
fde96a8e43
1 changed files with 1 additions and 0 deletions
|
@ -14,6 +14,7 @@ PORT = 4545
|
||||||
def serve_forever():
|
def serve_forever():
|
||||||
os.chdir(root_path) # Hopefully the main thread doesn't also chdir.
|
os.chdir(root_path) # Hopefully the main thread doesn't also chdir.
|
||||||
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
|
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
|
||||||
|
SocketServer.TCPServer.allow_reuse_address = True
|
||||||
httpd = SocketServer.TCPServer(("", PORT), Handler)
|
httpd = SocketServer.TCPServer(("", PORT), Handler)
|
||||||
print "Deno test server http://localhost:%d/" % PORT
|
print "Deno test server http://localhost:%d/" % PORT
|
||||||
httpd.serve_forever()
|
httpd.serve_forever()
|
||||||
|
|
Loading…
Reference in a new issue