[DOC] extras: update readme and server.py doc

This commit is contained in:
Géry Debongnie
2019-05-03 16:38:24 +02:00
parent ff2393f5df
commit 7c8fc323e1
2 changed files with 22 additions and 3 deletions
+6 -2
View File
@@ -8,8 +8,13 @@ import SimpleHTTPServer
HOST = '127.0.0.1'
PORT = 8000
URL = 'http://{0}:{1}/extras'.format(HOST, PORT)
# We define our own handler here to remap owl.js GET requests to the Owl build
# in dist/. This is useful for the benchmarks and playground applications.
# With this, we can simply copy the playground folder as is in the gh-page when
# we want to update the playground.
class OWLHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_GET(self):
if self.path == '/extras/owl.js':
@@ -24,8 +29,7 @@ def start_server():
if __name__ == "__main__":
thread.start_new_thread(start_server, ())
url = 'http://{0}:{1}/extras'.format(HOST, PORT)
webbrowser.open_new(url)
webbrowser.open_new(URL)
while True:
try: