You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c6925e4
Browse filesBrowse the repository at this point in the historyBrowse files
if curl -sf http://localhost:5313/ >/dev/null 2>&1 \
547
-
&& curl -sf http://localhost:5314/ >/dev/null 2>&1; then break; fi
548
-
sleep 1
549
-
done
550
-
if ! curl -sf http://localhost:5313/ >/dev/null 2>&1 \
551
-
|| ! curl -sf http://localhost:5314/ >/dev/null 2>&1; then
552
-
echo "FAIL: studio dev servers did not start"
553
-
exit 1
536
+
SERVER_PID=""
537
+
stop_server() {
538
+
if [[ -n "$SERVER_PID" ]]; then
539
+
kill "$SERVER_PID" 2>/dev/null || true
540
+
wait "$SERVER_PID" 2>/dev/null || true
541
+
SERVER_PID=""
542
+
fi
543
+
}
544
+
wait_for_server() {
545
+
local port="$1"
546
+
for i in $(seq 1 60); do
547
+
if curl -sf "http://localhost:${port}/" >/dev/null 2>&1; then return 0; fi
548
+
sleep 1
549
+
done
550
+
echo "FAIL: studio dev server did not start on port ${port}"
551
+
return 1
552
+
}
553
+
trap stop_server EXIT
554
+
555
+
# Run one server at a time so the measured browser never competes with
556
+
# a second Vite module graph on the shared runner. The development
557
+
# server supplies the fixture API; production React matches shipped
558
+
# rendering behavior, and the gate asserts that runtime before timing.
559
+
NODE_ENV=production \
560
+
bun run --cwd packages/studio dev -- --port 5313 --strictPort &
0 commit comments