13 lines · 426 B · Python
RawDownload
#!/usr/bin/env pythonimport BaseHTTPServer, SimpleHTTPServer port=8001print "Running on port %d" % port 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()