Mercurial
comparison infinite_canvas/serve.sh @ 276:b55c22cff335
Add interactive infinite canvas prototype
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 17 Aug 2026 16:57:56 -0700 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 274:c9be578316a6 | 276:b55c22cff335 |
|---|---|
| 1 #!/usr/bin/env bash | |
| 2 set -eu | |
| 3 | |
| 4 RUNFILES_ROOT="${RUNFILES_DIR:-$0.runfiles}" | |
| 5 WEB_HTML="$(find "$RUNFILES_ROOT" -path '*/infinite_canvas/web/index.html' -print -quit)" | |
| 6 | |
| 7 if [[ -z "$WEB_HTML" ]]; then | |
| 8 echo "Could not locate the infinite canvas web bundle." >&2 | |
| 9 exit 1 | |
| 10 fi | |
| 11 | |
| 12 WEB_DIR="$(dirname "$WEB_HTML")" | |
| 13 PORT="${1:-4343}" | |
| 14 echo "Serving http://127.0.0.1:${PORT}/index.html" | |
| 15 exec python3 -m http.server "$PORT" --bind 127.0.0.1 --directory "$WEB_DIR" |