Spaces:
Sleeping
Sleeping
File size: 1,187 Bytes
2eef9ea | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | #!/bin/bash
# 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
|