#!/usr/bin/env python3
"""Minimal HTTP server for the POC. Serves poc.html on localhost:8080."""
import http.server
import socketserver
import os

PORT = 18472

class Handler(http.server.SimpleHTTPRequestHandler):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, directory=os.path.dirname(os.path.abspath(__file__)), **kwargs)

    def log_message(self, fmt, *args):
        pass  # quiet

socketserver.TCPServer.allow_reuse_address = True
with socketserver.TCPServer(("127.0.0.1", PORT), Handler) as httpd:
    print(f"Serving POC on http://localhost:{PORT}/poc.html", flush=True)
    httpd.serve_forever()
