Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
30 lines (24 loc) · 812 Bytes

File metadata and controls

executable file
·
30 lines (24 loc) · 812 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# Enable job control and set up trap for cleanup
set -m
READY_FILE="/tmp/codebuff_server_ready_$$"
trap 'kill -TERM -$SERVER_PID 2>/dev/null; rm -f "$READY_FILE"; exit' EXIT INT TERM
# Start the server in background
echo "Starting server..."
bun start-server 2>&1 | tee >(grep -m 1 "🚀 Server is running on port" > /dev/null && touch "$READY_FILE") &
SERVER_PID=$!
# Wait for the ready signal
echo "Waiting for server to be ready..."
while [[ ! -f "$READY_FILE" ]]; do
# Check if server process is still running
if ! kill -0 $SERVER_PID 2>/dev/null; then
echo "Server process died unexpectedly"
exit 1
fi
sleep 0.1
done
echo "Server is ready! Starting client..."
# Clean up the signal file
rm -f "$READY_FILE"
# Start the client
bun start-bin -- --cwd .. "$@"
Morty Proxy This is a proxified and sanitized view of the page, visit original site.