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:
parent
0ce8fdb3c8
commit
f904b2a53f
1 changed files with 15 additions and 0 deletions
15
scripts/http_serv.sh
Executable file
15
scripts/http_serv.sh
Executable 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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue