Spaces:
Sleeping
Sleeping
| # run.sh - Start the development environment | |
| set -e | |
| echo "π Starting Multi-Agent System..." | |
| # Activate virtual environment | |
| if [ ! -d "venv" ]; then | |
| echo "β Virtual environment not found. Run './scripts/setup.sh' first" | |
| exit 1 | |
| fi | |
| source venv/bin/activate | |
| # Load environment variables | |
| if [ -f ".env" ]; then | |
| export $(cat .env | xargs) | |
| else | |
| echo "β οΈ .env file not found. Using defaults." | |
| fi | |
| # Start Redis in background (requires redis-server installed) | |
| if command -v redis-server &> /dev/null; then | |
| echo "π΄ Starting Redis..." | |
| redis-server --daemonize yes | |
| fi | |
| # Start backend | |
| echo "π Starting FastAPI backend on http://localhost:8000" | |
| uvicorn backend.api.main:app --host 0.0.0.0 --port 8000 --reload & | |
| BACKEND_PID=$! | |
| # Start frontend in background | |
| if [ -d "frontend" ]; then | |
| echo "π Starting React frontend on http://localhost:3000" | |
| cd frontend | |
| npm run dev & | |
| FRONTEND_PID=$! | |
| cd .. | |
| fi | |
| echo "β¨ System started!" | |
| echo "Backend: http://localhost:8000" | |
| echo "Frontend: http://localhost:3000" | |
| echo "API Docs: http://localhost:8000/docs" | |
| echo "" | |
| echo "Press Ctrl+C to stop" | |
| # Wait for processes | |
| wait $BACKEND_PID | |