PythonでWebサーバーを起動
① コマンド
python -m http.server 8000
② Pythonスクリプト (httpserver.py)
import http.server
import socketserver
PORT = 8000
Handler = http.server.SimpleHTTPRequestHandler
with socketserver.TCPServer(("", PORT), Handler) as httpd:
print("serving at port", PORT)
httpd.serve_forever()