Initial commit 4.

This commit is contained in:
2025-05-07 14:17:54 +08:00
parent f1919ab7bd
commit 0381f6a0be
5 changed files with 26 additions and 92 deletions
+11 -1
View File
@@ -18,8 +18,18 @@ else
echo -e "${GREEN}Node.js version is correct: $NODE_VERSION${NC}"
fi
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_ROOT="$SCRIPT_DIR/.."
# Start the backend server
cd "$REPO_ROOT/backend" || exit 1
echo -e "${BLUE}Starting backend server...${NC}"
go run main.go &
BACKEND_PID=$!
echo -e "${GREEN}Backend server started with PID $BACKEND_PID.${NC}"
# Start the frontend dev server from anywhere in the repo
cd "$(dirname "$0")/../frontend" || exit 1
cd "$REPO_ROOT/frontend" || exit 1
# Install dependencies
if [ -f package.json ]; then
+3 -1
View File
@@ -151,7 +151,9 @@ rm -rf "${TEMP_DIR}" || handle_error "Failed to clean up local temporary files"
echo -e "${GREEN}Deployment process completed!${NC}"
# Automatically tail logs after deployment
echo -e "${GREEN}Tailing logs...${NC}"
sh "$(dirname "$0")/log.sh" -f
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_ROOT="$SCRIPT_DIR/.."
sh "$SCRIPT_DIR/log.sh" -f
LOG_EXIT_CODE=$?
if [ $LOG_EXIT_CODE -eq 130 ]; then
echo -e "${YELLOW}Log viewing interrupted by user.${NC}"