docs: fix placeholder URLs in QUICKSTART; add committed example scripts

QUICKSTART.md had the author's personal domain as the example anchor URL
(wss://waste.dev.xplwd.com/ws) which would confuse anyone reading it.
Replaced with wss://YOUR_ANCHOR_DOMAIN/ws and added a new Option 3
section explaining the example scripts.

Added committed *.example versions of the four local-workflow scripts
(launch-tui, launch-web, deploy-web, serve-web). The real filenames are
gitignored so local edits (HOST, ANCHOR, etc.) are never accidentally
committed; the .example files serve as templates users copy once.
Each script fails fast if the placeholder URL/host is still set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Fredrik Johansson
2026-07-02 11:51:02 +02:00
parent f425e0bb8e
commit d07342e97e
5 changed files with 264 additions and 4 deletions

38
serve-web.sh.example Normal file
View File

@@ -0,0 +1,38 @@
#!/usr/bin/env bash
# serve-web.sh — start (or restart) the static file server on the VPS.
# Runs `npx serve` in the background, logs to ~/waste-www.log.
#
# SETUP: copy this file to serve-web.sh (gitignored) and set HOST below.
#
# Usage:
# ./serve-web.sh
#
# Optional env vars:
# HOST SSH target (user@host) (required — edit below)
# REMOTE_DIR path on VPS (default: ~/waste-www)
# PORT local port on VPS (default: 1337)
set -euo pipefail
HOST="${HOST:-user@YOUR_VPS_IP}" # ← edit this
REMOTE_DIR="${REMOTE_DIR:-~/waste-www}"
REMOTE_LOG="~/waste-www.log"
REMOTE_PID="~/waste-www.pid"
PORT="${PORT:-1337}"
if [[ "$HOST" == *YOUR_VPS_IP* ]]; then
echo "error: edit HOST in this script (or export HOST=user@your-vps before running)" >&2
exit 1
fi
ssh "$HOST" bash <<EOF
if [ -f $REMOTE_PID ]; then
kill \$(cat $REMOTE_PID) 2>/dev/null || true
rm -f $REMOTE_PID
fi
echo "[\$(date)] starting npx serve on port $PORT" >> $REMOTE_LOG
nohup npx serve -s $REMOTE_DIR -l $PORT >> $REMOTE_LOG 2>&1 &
echo \$! > $REMOTE_PID
echo "→ started (pid \$(cat $REMOTE_PID)), logging to $REMOTE_LOG"
EOF