#!/bin/bash # Neural Sync React 版本一键启动器 # 双击此文件启动新版 React + Tailwind 前端 cd "$(dirname "$0")" echo "🚀 Starting Neural Sync (React Edition)..." echo "" # Stop existing services lsof -ti:8000 2>/dev/null | xargs kill -9 2>/dev/null || true lsof -ti:5174 2>/dev/null | xargs kill -9 2>/dev/null || true sleep 1 # Create logs directory mkdir -p logs # Start backend echo "[START] Backend Service..." cd backend source ../venv/bin/activate nohup uvicorn app.main:app --reload --port 8000 > ../logs/backend.log 2>&1 & cd .. # Wait for backend sleep 3 # Start React frontend echo "[START] React Frontend..." cd frontend-react nohup npm run dev -- --host > ../logs/frontend-react.log 2>&1 & cd .. # Wait for frontend sleep 5 echo "" echo "✅ Services Started!" echo "" echo " Frontend (React): http://127.0.0.1:5174" echo " Frontend (Vue): http://127.0.0.1:5173" echo " Backend API: http://127.0.0.1:8000" echo "" echo "💡 Stop services: ./stop.sh" echo "💡 View logs: tail -f logs/frontend-react.log" echo "" echo "Press any key to close this window..." read -n 1