mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 15:28:27 +01:00
scripts/home-start.sh starts server + watcher + worker together, merges
their output (with [server] / [watcher] / [worker] prefixes per line)
into /tmp/${APP_SLUG}-home.log, and traps SIGINT to take the whole stack
down cleanly. Removes the previous three-terminal ceremony — one command,
one log, one Ctrl-C.
Pre-flight: refuses to start if anything is already serving
localhost:3001, so two stacks can't race on the same events.jsonl file.
Wait -n: if any child process exits unexpectedly, the launcher tears the
remaining two down. The user gets one obvious signal instead of a quiet
half-broken loop where (say) the worker crashed but the server kept
serving stale state.
home/README.md updated to point at the launcher first, with the
three-terminal recipe kept for iterative development.
Unblocks the M9 live exercise: previously each test required three
terminals + remembering each command + cleaning up three pids manually.
Now it's `bash scripts/home-start.sh` → curl /api/dispatch → Ctrl-C.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>