summaryrefslogtreecommitdiff
path: root/site/test.py
blob: eb696369cdc1d87f707f090a1978cc5021bde05b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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()