You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
473 B
Python

#!/usr/bin/env python3
# From https://gist.github.com/prideout/09af26cef84eef3e06a1e3f20a499a48
import http.server
import socketserver
PORT = 8000
handler = http.server.SimpleHTTPRequestHandler
handler.extensions_map.update({
'.wasm': 'application/wasm',
})
socketserver.TCPServer.allow_reuse_address = True
with socketserver.TCPServer(("", PORT), handler) as httpd:
httpd.allow_reuse_address = True
print("Serving at port", PORT)
httpd.serve_forever()