Merge pull request #1212 from Nekomantikku/master

Add shell script to launch local HTTP server and open browser (GNU/Linux)
This commit is contained in:
Nekomantikku 2025-06-20 00:18:57 +02:00 committed by GitHub
parent d9391d6d97
commit a3dcc8d2c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

13
run_python_server.sh Normal file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env sh
if command -v python3 >/dev/null 2>&1; then
PYTHON=python3
elif command -v python >/dev/null 2>&1; then
PYTHON=python
else
echo "Neither 'python' nor 'python3' was found. Please install Python 3 package." >&2
exit 1
fi
chromium http://localhost:8000
$PYTHON -m http.server 8000