-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·54 lines (43 loc) · 1.08 KB
/
Copy pathrun.sh
File metadata and controls
executable file
·54 lines (43 loc) · 1.08 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
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env bash
set -e
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "🐝 Starting NeoSwarm..."
cd "$PROJECT_ROOT"
# Check for Python
if ! command -v python3 &> /dev/null; then
echo "Error: Python 3 not found"
exit 1
fi
# Check for Node.js
if ! command -v node &> /dev/null; then
echo "Error: Node.js not found"
exit 1
fi
# Start backend
echo "Starting FastAPI backend on :8324..."
cd "$PROJECT_ROOT/backend"
python3 -m uvicorn main:app --host 127.0.0.1 --port 8324 &
BACKEND_PID=$!
cd "$PROJECT_ROOT"
# Wait for backend
echo "Waiting for backend..."
for i in {1..30}; do
if curl -s http://localhost:8324/health &> /dev/null 2>&1; then
echo "Backend ready!"
break
fi
sleep 1
done
# Start frontend dev server
echo "Starting React frontend on :3000..."
cd "$PROJECT_ROOT/frontend"
npm run dev &
FRONTEND_PID=$!
echo ""
echo "🐝 NeoSwarm running!"
echo " Frontend: http://localhost:3000"
echo " Backend: http://localhost:8324"
echo ""
echo "Press Ctrl+C to stop"
# Wait for either to exit
wait $BACKEND_PID $FRONTEND_PID