#!/bin/bash # 简化启动脚本 - 快速启动前后端应用 # 作者: Qwen Assistant # 功能: 快速启动系统,带基本检查 set -e # 遇到错误立即退出 # 颜色定义 RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' BLUE='\033[0;34m' NC='\033[0m' # No Color # 打印带颜色的消息 print_message() { local color=$1 local message=$2 echo -e "${color}${message}${NC}" } print_message $BLUE "🚀 启动 WordMaster Pro 系统..." # 检查基本环境 if ! command -v python3 &> /dev/null; then print_message $RED "❌ Python3 未安装,请先安装 Python 3.8+" exit 1 fi if ! command -v node &> /dev/null; then print_message $RED "❌ Node.js 未安装,请先安装 Node.js 16+" exit 1 fi print_message $GREEN "✅ 环境检查通过" # 获取脚本目录 SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "$SCRIPT_DIR" # 建议使用优化版启动脚本 print_message $YELLOW "💡 提示: 使用 ./start_app.sh 启动脚本可获得更好的稳定性、依赖检查和错误处理" # 直接调用优化版启动脚本 exec ./start_app.sh