summaryrefslogtreecommitdiff
path: root/site/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'site/test.py')
-rw-r--r--site/test.py15
1 files changed, 15 insertions, 0 deletions
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()