Initial commit: Carrot Hunter v2 with 20 levels

This commit is contained in:
Alex
2026-01-28 13:58:46 +01:00
commit 26594879a2
78 changed files with 9223 additions and 0 deletions

21
start_server.py Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env python3
import http.server
import socketserver
from functools import partial
class CORSRequestHandler(http.server.SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header('Access-Control-Allow-Origin', '*')
self.send_header('Access-Control-Allow-Methods', 'GET')
self.send_header('Cache-Control', 'no-store, no-cache, must-revalidate')
super().end_headers()
PORT = 8080
handler = partial(CORSRequestHandler, directory='/home/alex/git/carrot/Carrot_Hunter')
print(f"\n✓ Server kører på http://localhost:{PORT}")
print(f"✓ Åbn: http://localhost:{PORT}/index.html")
print(f"✓ Med CORS headers aktiveret\n")
with socketserver.TCPServer(("", PORT), handler) as httpd:
httpd.serve_forever()