1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-keygen synced 2026-07-03 11:53:41 +02:00

WASM: Adding a simple http server for testing.

This commit is contained in:
Henrik Hautakoski 2020-01-02 20:12:50 +01:00
parent 0ce8fdb3c8
commit f904b2a53f

15
scripts/http_serv.sh Executable file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env python
import os, BaseHTTPServer, SimpleHTTPServer
port=8000
print "Running on port %d" % port
base_path = os.path.dirname(os.path.realpath(__file__))
os.chdir(base_path + "/../build")
SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map['.wasm'] = 'application/wasm'
httpd = BaseHTTPServer.HTTPServer(('localhost', port),
SimpleHTTPServer.SimpleHTTPRequestHandler)
print "Mapping \".wasm\" to \"%s\"" % SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map['.wasm']
httpd.serve_forever()