bbcovert/test.py

8 lines
316 B
Python
Raw Normal View History

2024-06-22 14:50:40 +08:00
from http.server import test, SimpleHTTPRequestHandler as RH
from functools import partial
RH.extensions_map = {k: v+';charset=UTF-8' for k,
v in RH.extensions_map.items()}
RH.extensions_map['.html'] = 'text/html; charset=utf-8'
test(HandlerClass=partial(RH,
directory="build"), port=8000)