1#!/usr/bin/env python3 2# Copyright 2018 Google LLC 3# 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6 7import http.server 8import socketserver 9 10PORT = 8000 11 12class Handler(http.server.SimpleHTTPRequestHandler): 13 pass 14 15Handler.extensions_map['.js'] = 'application/javascript' 16# Without the correct MIME type, async compilation doesn't work 17Handler.extensions_map['.wasm'] = 'application/wasm' 18 19httpd = socketserver.TCPServer(("", PORT), Handler) 20 21httpd.serve_forever() 22