mirror of
https://git.fsfe.org/FSFE/fsfe-local-build.git
synced 2026-04-20 11:23:06 +02:00
adding option to use python simplehttp webserver module which doesn't require users to install lighttpd
This commit is contained in:
15
pywebserver-fsfe.py
Executable file
15
pywebserver-fsfe.py
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/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()
|
||||
Reference in New Issue
Block a user