Files
2026-02-23 14:02:44 +01:00

26 lines
781 B
Bash
Executable File

#!/bin/bash
cd "$(dirname "$0")"
echo "------------------------------------------------"
echo "Hotline Planner: Modular Launcher"
echo "------------------------------------------------"
echo "Reason: Browsers block local file access (CORS) for ES Modules."
echo "Action: Starting a local web server..."
# Kill any existing server on port 8000
lsof -ti:8000 | xargs kill -9 2>/dev/null
# Start Python HTTP server in the background
python3 -m http.server 8000 &
# Give it a moment to initialize
sleep 1
# Open the default browser
open http://localhost:8000
echo "SUCCESS: Server running at http://localhost:8000"
echo "Keep this window open while using the app."
echo "Press Ctrl+C here to stop the server manually."
echo "------------------------------------------------"
wait