1
0
mirror of https://git.fsfe.org/FSFE/fsfe-local-build.git synced 2026-04-20 03:13:05 +02:00
Files
fsfe-local-build/pywebserver-fsfe.py

16 lines
280 B
Python
Executable File

#!/usr/bin/env python3
import http.server
import socketserver
import os
import sys
WEB_DIR = sys.argv[1]
WEB_PORT = int(sys.argv[2])
os.chdir(WEB_DIR)
Handler = http.server.SimpleHTTPRequestHandler
httpd = socketserver.TCPServer(("", WEB_PORT), Handler)
httpd.serve_forever()