Update meshenger_clientserve.py
serve the webapp.html on every url requested
This commit is contained in:
parent
440c794de7
commit
ec18d8db6f
@ -32,10 +32,12 @@ class ClientServeHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|||||||
return SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
|
return SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.send_response(404)
|
self.send_response(200) #serve the webapp on every url requested
|
||||||
self.send_header('Content-type', 'text/html')
|
self.send_header('Content-type', 'text/html')
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
self.wfile.write('404 - Not Found')
|
f = os.path.join( "webapp.html")
|
||||||
|
with open( f, 'r') as the_file:
|
||||||
|
self.wfile.write(the_file.read())
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user