14 lines
343 B
Python
14 lines
343 B
Python
#!/usr/bin/env python3
|
|
from http.server import SimpleHTTPRequestHandler, HTTPServer
|
|
|
|
PORT = 8000
|
|
|
|
def run_server():
|
|
handler = SimpleHTTPRequestHandler
|
|
httpd = HTTPServer(("", PORT), handler)
|
|
print(f"Serving HTTP on port {PORT} (http://localhost:{PORT}/) …")
|
|
httpd.serve_forever()
|
|
|
|
if __name__ == "__main__":
|
|
run_server()
|