-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_dev.sh
More file actions
44 lines (38 loc) Β· 1.6 KB
/
Copy pathstart_dev.sh
File metadata and controls
44 lines (38 loc) Β· 1.6 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# MiniWord Server Development Start Script (Foreground)
echo "π Starting MiniWord server in DEVELOPMENT MODE (foreground)..."
# Navigate to MiniWord directory
cd /shared/nas/data/m1/jiateng5/Mini_Word
# Use port 8001 since 8000 is in use by another user's vLLM server
PORT=8004
# Check if port 8001 is already in use
echo "Checking port $PORT..."
PORT_CHECK=$(netstat -tlnp | grep ":$PORT")
if [ ! -z "$PORT_CHECK" ]; then
echo "β οΈ Port $PORT is already in use:"
echo "$PORT_CHECK"
echo ""
echo "Please run ./stop.sh first to stop the existing server."
exit 1
fi
# Start the server in FOREGROUND (not background)
echo "Starting server on port $PORT in FOREGROUND..."
echo "π‘ Server will show all requests and debug info in this terminal"
echo "π Server URL: http://172.22.225.5:$PORT/index.html"
echo "π Local URL: http://localhost:$PORT/index.html"
echo ""
echo "π‘ Development Tips:"
echo " β’ All server logs will appear in this terminal"
echo " β’ Press Ctrl+C to stop the server"
echo " β’ Open browser console (F12) to see JavaScript debug logs"
echo " β’ Use Ctrl+F5 in browser to force refresh"
echo ""
echo "π DEBUGGING CLIPBOARD OPERATIONS:"
echo " β’ Look for πͺ (cut), π (copy), π₯ (paste), βοΈ (insert) emojis in browser console"
echo " β’ All clipboard operations now have detailed logging"
echo " β’ Check browser console for step-by-step debugging info"
echo ""
echo "Starting server now..."
echo "=========================================="
# Start server in foreground (no & at the end)
python3 -m http.server $PORT --bind 0.0.0.0