This commit is contained in:
Devi-priya-dp 2025-11-27 11:25:53 +05:30
parent 231928e228
commit 3c9538492c

View File

@ -108,18 +108,18 @@ else
PIP_BIN="pip3"
fi
info "Checking Node.js & npm..."
if ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then
info "Installing Node.js (LTS)..."
sudo apt update -y
sudo apt install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
NODE_MAJOR=20
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt update -y
sudo apt install -y nodejs
fi
# info "Checking Node.js & npm..."
# if ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then
# info "Installing Node.js (LTS)..."
# sudo apt update -y
# sudo apt install -y ca-certificates curl gnupg
# sudo mkdir -p /etc/apt/keyrings
# curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
# NODE_MAJOR=20
# echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
# sudo apt update -y
# sudo apt install -y nodejs
# fi
# ---------- helper to start background processes ----------
start_bg(){
@ -132,7 +132,7 @@ start_bg(){
# ---------- sanity checks ----------
[ -d "$BACKEND_DIR" ] || fail "Backend directory '$BACKEND_DIR' not found."
[ -d "$FRONTEND_DIR" ] || fail "Frontend directory '$FRONTEND_DIR' not found."
# [ -d "$FRONTEND_DIR" ] || fail "Frontend directory '$FRONTEND_DIR' not found."
[ -f "$BACKEND_DIR/init.sql" ] || fail "BACKEND_DIR/init.sql not found. Please create $BACKEND_DIR/init.sql"
# ---------- Install Docker (if missing) ----------