-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·69 lines (59 loc) · 1.62 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·69 lines (59 loc) · 1.62 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
#!/bin/bash
echo "=========================================="
echo " Quantum Compiler - Setup Script"
echo "=========================================="
echo ""
# Colors
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed. Please install Node.js first."
exit 1
fi
echo -e "${GREEN}✓${NC} Node.js found: $(node --version)"
# Check if npm is installed
if ! command -v npm &> /dev/null; then
echo "❌ npm is not installed. Please install npm first."
exit 1
fi
echo -e "${GREEN}✓${NC} npm found: $(npm --version)"
# Install backend dependencies
echo ""
echo -e "${BLUE}Installing backend dependencies...${NC}"
cd backend
npm install
if [ $? -eq 0 ]; then
echo -e "${GREEN}✓${NC} Backend dependencies installed"
else
echo "❌ Failed to install backend dependencies"
exit 1
fi
# Install frontend dependencies
echo ""
echo -e "${BLUE}Installing frontend dependencies...${NC}"
cd ../frontend
npm install
if [ $? -eq 0 ]; then
echo -e "${GREEN}✓${NC} Frontend dependencies installed"
else
echo "❌ Failed to install frontend dependencies"
exit 1
fi
cd ..
echo ""
echo "=========================================="
echo -e "${GREEN}✓ Setup completed successfully!${NC}"
echo "=========================================="
echo ""
echo "To start the application:"
echo ""
echo "1. Start backend (in terminal 1):"
echo " cd backend && npm start"
echo ""
echo "2. Start frontend (in terminal 2):"
echo " cd frontend && npm start"
echo ""
echo "The app will open at http://localhost:3000"
echo ""