Created
April 18, 2019 15:30
-
-
Save dbrgn/6bf88d32b1b44b1b1d4140f92b8a7a0a to your computer and use it in GitHub Desktop.
WASM aware python testserver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from http import server | |
PORT = 8000 | |
class WasmAwareRequestHandler(server.SimpleHTTPRequestHandler): | |
def __init__(self, *args, **kwargs): | |
super().__init__(*args, **kwargs) | |
self.extensions_map['.wasm'] = 'application/wasm' | |
httpd = server.HTTPServer(('localhost', PORT), WasmAwareRequestHandler) | |
print('Starting server on port %d' % PORT) | |
httpd.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment