-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.command
More file actions
34 lines (27 loc) · 746 Bytes
/
Copy pathrun.command
File metadata and controls
34 lines (27 loc) · 746 Bytes
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
#!/bin/bash
# Double-click to start NetScope on macOS
# macOS runs .command files in Terminal when double-clicked
cd "$(dirname "$0")"
echo ""
echo " NetScope Network Monitor"
echo " ========================"
echo ""
if ! command -v node &> /dev/null; then
echo " Node.js not found. Install with:"
echo " brew install node"
echo " Or download from https://nodejs.org"
echo ""
read -p " Press Enter to exit..."
exit 1
fi
echo " Node.js $(node -v)"
if [ ! -d "node_modules" ]; then
echo " Installing packages (first run)..."
npm install --production
fi
echo ""
echo " Starting on http://localhost:3000"
echo " Press Ctrl+C to stop"
echo ""
sleep 2 && open "http://localhost:3000" &
node server.js