summaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-27 22:03:59 +0900
committerAdam Malczewski <[email protected]>2026-06-27 22:03:59 +0900
commit831747ddb5886364707b696ac38cce8da333f15d (patch)
tree1b3c983c2b9964d55adec16e2e3a78190fbedbbe /bin
parentb0534c0b53fc116521245c14b05d0120a1cded89 (diff)
downloadstudy-player-V1.tar.gz
study-player-V1.zip
V1: preserve pre-refactor state (single-file main.c + harness docs)V1
Diffstat (limited to 'bin')
-rwxr-xr-xbin/serve18
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/serve b/bin/serve
new file mode 100755
index 0000000..931e2db
--- /dev/null
+++ b/bin/serve
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
+cd "$SCRIPT_DIR"
+
+BUILD_DIR="build-web"
+
+if [ ! -f "$BUILD_DIR/index.html" ]; then
+ echo "Error: Web build not found. Run 'bin/build-web' first."
+ exit 1
+fi
+
+PORT="${1:-8080}"
+
+echo "Serving study-player at http://localhost:$PORT"
+echo "Press Ctrl+C to stop."
+python3 -m http.server "$PORT" -d "$BUILD_DIR"