#!/usr/bin/env python3
"""Static HTTP server for the WebGL POC. Listens on 0.0.0.0:8080."""
import http.server
import socketserver
import os

os.chdir(os.path.dirname(os.path.abspath(__file__)))

PORT = 8080
Handler = http.server.SimpleHTTPRequestHandler
Handler.extensions_map.update({'.html': 'text/html', '.js': 'text/javascript'})

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