2021-08-31 14:21:57 +00:00
|
|
|
#!/usr/bin/env python3
|
2018-08-02 15:30:33 +00:00
|
|
|
# Copyright 2018 Google LLC
|
2021-08-31 14:21:57 +00:00
|
|
|
#
|
2018-08-02 15:30:33 +00:00
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
2021-08-31 14:21:57 +00:00
|
|
|
import http.server
|
|
|
|
import socketserver
|
2018-08-02 15:30:33 +00:00
|
|
|
|
|
|
|
PORT = 8000
|
|
|
|
|
2021-08-31 14:21:57 +00:00
|
|
|
class Handler(http.server.SimpleHTTPRequestHandler):
|
2018-08-02 15:30:33 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
Handler.extensions_map['.js'] = 'application/javascript'
|
|
|
|
# Without the correct MIME type, async compilation doesn't work
|
|
|
|
Handler.extensions_map['.wasm'] = 'application/wasm'
|
|
|
|
|
2021-08-31 14:21:57 +00:00
|
|
|
httpd = socketserver.TCPServer(("", PORT), Handler)
|
2018-08-02 15:30:33 +00:00
|
|
|
|
|
|
|
httpd.serve_forever()
|