Add local serve script

This commit is contained in:
Mark McGranaghan 2019-03-20 11:30:56 -07:00
parent cdd115dfc8
commit c43c319d26

17
tools/serve Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/python
import SimpleHTTPServer
import SocketServer
import os
PORT = 8000
public_dir = os.path.join(os.path.dirname(__file__), '..', 'public')
os.chdir(public_dir)
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
Handler.extensions_map.update({
'': 'text/html',
});
httpd = SocketServer.TCPServer(("", PORT), Handler)
httpd.serve_forever()