mirror of
https://github.com/thib8956/tic-tac-toe-ws.git
synced 2024-11-17 01:16:33 +00:00
12 lines
315 B
Python
12 lines
315 B
Python
import http.server
|
|
|
|
HandlerClass = http.server.SimpleHTTPRequestHandler
|
|
|
|
# Patch in the correct extensions
|
|
HandlerClass.extensions_map['.js'] = 'text/javascript'
|
|
HandlerClass.extensions_map['.mjs'] = 'text/javascript'
|
|
|
|
# Run the server (like `python -m http.server` does)
|
|
http.server.test(HandlerClass, port=8000)
|
|
|