Skip to content

Instantly share code, notes, and snippets.

@mjhanninen
Last active January 12, 2019 21:17
Show Gist options
  • Save mjhanninen/320f164aad3d4c8ecc6ba6012977aece to your computer and use it in GitHub Desktop.
Save mjhanninen/320f164aad3d4c8ecc6ba6012977aece to your computer and use it in GitHub Desktop.
Minimal Python based server for serving application/wasm
#!/usr/bin/env python3
from http.server import SimpleHTTPRequestHandler
import socketserver
SimpleHTTPRequestHandler.extensions_map[".wasm"] = "application/wasm"
print("Serving at port 8000")
socketserver.TCPServer(("", 8000), SimpleHTTPRequestHandler).serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment