From 564ab9056268e05621ceb4878ba3b3683abeaf10 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sun, 4 Apr 2021 15:33:20 +0200 Subject: simple python server for testing purposes web assembly needs its own mimetype set to work in the browser, which most other development tools don't support — so this python script can be used instead. --- site/test.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 site/test.py diff --git a/site/test.py b/site/test.py new file mode 100644 index 0000000..eb69636 --- /dev/null +++ b/site/test.py @@ -0,0 +1,15 @@ +import http.server +import socketserver + +PORT = 8000 + +Handler = http.server.SimpleHTTPRequestHandler +Handler.extensions_map.update({ + '.wasm': 'application/wasm', +}) + +socketserver.TCPServer.allow_reuse_address = True +with socketserver.TCPServer(("", PORT), Handler) as httpd: + httpd.allow_reuse_address = True + print("serving at port", PORT) + httpd.serve_forever() -- cgit v1.2.3