-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·43 lines (36 loc) · 944 Bytes
/
setup.sh
File metadata and controls
executable file
·43 lines (36 loc) · 944 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
35
36
37
38
39
40
41
42
43
#!/bin/bash
# Colors for output
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Get the directory where this script lives
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
case "$1" in
client)
echo -e "${BLUE}Starting Client...${NC}"
cd "$ROOT_DIR/client"
npm run build && npm run start
;;
server)
echo -e "${BLUE}Starting Server...${NC}"
cd "$ROOT_DIR/server"
npm run start:prod
;;
python)
echo -e "${BLUE}Starting Python API...${NC}"
cd "$ROOT_DIR/python"
source venv/bin/activate
cd api
python3 main.py
;;
all)
echo -e "${GREEN}Starting all services...${NC}"
cd "$ROOT_DIR/client" && npm run build && npm run start &
cd "$ROOT_DIR/server" && npm run start:prod &
cd "$ROOT_DIR/python" && source venv/bin/activate && cd api && python3 main.py &
wait
;;
*)
echo "Usage: ./setup.sh [client|server|python|all]"
;;
esac