Archived
1
0
Fork 0
This repository has been archived on 2024-10-31. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/simpleDots/bin/server.py

23 lines
428 B
Python
Raw Permalink Normal View History

2023-12-25 15:48:01 +01:00
#!/usr/bin/env python3
import http.server as SimpleHTTPServer
import socketserver as SocketServer
import logging
PORT = 8000
class GetHandler(
SimpleHTTPServer.SimpleHTTPRequestHandler
):
def do_GET(self):
logging.error(self.headers)
SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
Handler = GetHandler
httpd = SocketServer.TCPServer(("", PORT), Handler)
httpd.serve_forever()