Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Python WASM server
#!/usr/bin/env python3
import http.server
import socketserver
PORT = 8000
Handler = http.server.SimpleHTTPRequestHandler
'.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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment