diff options
| author | Adam Malczewski <[email protected]> | 2026-06-27 22:03:59 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-27 22:03:59 +0900 |
| commit | 831747ddb5886364707b696ac38cce8da333f15d (patch) | |
| tree | 1b3c983c2b9964d55adec16e2e3a78190fbedbbe /bin/serve | |
| parent | b0534c0b53fc116521245c14b05d0120a1cded89 (diff) | |
| download | study-player-V1.tar.gz study-player-V1.zip | |
V1: preserve pre-refactor state (single-file main.c + harness docs)V1
Diffstat (limited to 'bin/serve')
| -rwxr-xr-x | bin/serve | 18 |
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" |
