From a3dcc8d2c4fb974a679e14f606f97643cd33cf8f Mon Sep 17 00:00:00 2001 From: Nekomantikku <154403265+Nekomantikku@users.noreply.github.com> Date: Fri, 20 Jun 2025 00:18:57 +0200 Subject: [PATCH] Merge pull request #1212 from Nekomantikku/master Add shell script to launch local HTTP server and open browser (GNU/Linux) --- run_python_server.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 run_python_server.sh diff --git a/run_python_server.sh b/run_python_server.sh new file mode 100644 index 00000000..7ac82957 --- /dev/null +++ b/run_python_server.sh @@ -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