-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
Β·55 lines (46 loc) Β· 1.36 KB
/
setup.sh
File metadata and controls
executable file
Β·55 lines (46 loc) Β· 1.36 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
#!/bin/bash
# Vikings Rise Simulator Web Edition - Setup Script
echo "ποΈ Setting up Vikings Rise Simulator Web Edition..."
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "β Node.js is not installed. Please install Node.js 16+ and try again."
exit 1
fi
# Check if Java is installed
if ! command -v java &> /dev/null; then
echo "β Java is not installed. Please install Java 17+ and try again."
exit 1
fi
# Check if Maven is installed
if ! command -v mvn &> /dev/null; then
echo "β Maven is not installed. Please install Maven 3.6+ and try again."
exit 1
fi
echo "β
Prerequisites check passed"
# Setup Frontend
echo "π¦ Installing frontend dependencies..."
cd frontend
npm install
if [ $? -ne 0 ]; then
echo "β Failed to install frontend dependencies"
exit 1
fi
cd ..
# Setup Backend
echo "π¦ Installing backend dependencies..."
cd backend
mvn clean install -q
if [ $? -ne 0 ]; then
echo "β Failed to install backend dependencies"
exit 1
fi
cd ..
echo "β
Setup completed successfully!"
echo ""
echo "π To start the application:"
echo " 1. Start backend: cd backend && mvn spring-boot:run"
echo " 2. Start frontend: cd frontend && npm start"
echo ""
echo "π The application will be available at:"
echo " Frontend: http://localhost:3000"
echo " Backend: http://localhost:8080"