#!/bin/bash # 开发模式启动脚本 echo "🚀 启动开发服务器..." # 进入项目根目录 cd "$(dirname "$0")/.." # 确保 concurrently 可用(已在 package.json 的 devDependencies 中) if ! pnpm exec concurrently --help &> /dev/null; then echo "⚠️ concurrently 不可用,跳过安装(应该已经在 devDependencies 中)" fi # 启动前后端 # 使用 turbo 的 dev 任务,它会自动调用各个包的 dev 脚本 pnpm exec concurrently \ --names "frontend,backend" \ --prefix-colors "blue,green" \ "cd apps/web && pnpm dev" \ "cd apps/server && pnpm dev"