summarylogtreecommitdiffstats
path: root/launch.py
blob: 7b35a72ca6e99f18334838b9fef36f4251aeb643 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python3

from http import server

PORT = 4242


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()