-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
70 lines (57 loc) · 1.48 KB
/
Copy pathsetup.sh
File metadata and controls
70 lines (57 loc) · 1.48 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
# Quick start script for Spot Command Center
echo "🤖 Spot Robot Command Center - Quick Start"
echo "==========================================="
# Check Python
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 not found. Please install Python 3.8+"
exit 1
fi
# Check Node
if ! command -v node &> /dev/null; then
echo "❌ Node.js not found. Please install Node.js 16+"
exit 1
fi
echo "✓ Python $(python3 --version)"
echo "✓ Node $(node --version)"
# Setup backend
echo ""
echo "Setting up backend..."
cd backend
if [ ! -f "venv/bin/activate" ]; then
echo "Creating Python virtual environment..."
python3 -m venv venv
fi
source venv/bin/activate
pip install -q -r requirements.txt
echo "✓ Backend dependencies installed"
# Check for .env
if [ ! -f ".env" ]; then
echo "Creating .env file from template..."
cp .env.example .env
echo "⚠️ Edit backend/.env with your robot's IP address"
fi
cd ..
# Setup frontend
echo ""
echo "Setting up frontend..."
cd frontend
if [ ! -d "node_modules" ]; then
echo "Installing npm dependencies..."
npm install -q
fi
echo "✓ Frontend dependencies installed"
cd ..
echo ""
echo "✅ Setup complete!"
echo ""
echo "To start the application:"
echo ""
echo "Terminal 1 (Backend):"
echo " cd backend && source venv/bin/activate && python app.py"
echo ""
echo "Terminal 2 (Frontend):"
echo " cd frontend && npm start"
echo ""
echo "Then open http://localhost:3000 in your browser"
echo ""