- run.sh builds frontend then serves in production mode - Persist AGENT in .env.local and show it in worktree list - Add preview proxy config so production mode routes API/WS correctly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
387 B
Bash
Executable File
28 lines
387 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
# Build frontend
|
|
cd frontend
|
|
bun run build
|
|
cd ..
|
|
|
|
cleanup() {
|
|
kill $BE_PID $FE_PID 2>/dev/null || true
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
# Backend (production)
|
|
cd backend
|
|
bun run start 2>&1 | sed 's/^/[BE] /' &
|
|
BE_PID=$!
|
|
cd ..
|
|
|
|
# Frontend (preview built assets)
|
|
cd frontend
|
|
bun run preview 2>&1 | sed 's/^/[FE] /' &
|
|
FE_PID=$!
|
|
cd ..
|
|
|
|
wait
|