| 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 | |
| 7 | import http.server |
| 8 | import socketserver |
| 9 | |
| 10 | PORT = 8000 |
| 11 | |
| 12 | class Handler(http.server.SimpleHTTPRequestHandler): |
| 13 | pass |
| 14 | |
| 15 | Handler.extensions_map['.js'] = 'application/javascript' |
| 16 | # Without the correct MIME type, async compilation doesn't work |
| 17 | Handler.extensions_map['.wasm'] = 'application/wasm' |
| 18 | |
| 19 | httpd = socketserver.TCPServer(("", PORT), Handler) |
| 20 | |
| 21 | httpd.serve_forever() |