Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (17 sloc) 536 Bytes
try:
import SimpleHTTPServer
except ImportError:
from http import server as SimpleHTTPServer
try:
import SocketServer
except ImportError:
import socketserver as SocketServer
PORT = 8888
# Simple HTTP Handler
class Handler(SimpleHTTPServer.SimpleHTTPRequestHandler):
pass
# We need this since browsers won't load the file without the proper mime type!
Handler.extensions_map['.wasm'] = 'application/wasm'
httpd = SocketServer.TCPServer(("", PORT), Handler)
print("serving at port", PORT)
httpd.serve_forever()
You can’t perform that action at this time.