-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstart_dev.sh
More file actions
executable file
·70 lines (59 loc) · 1.93 KB
/
Copy pathstart_dev.sh
File metadata and controls
executable file
·70 lines (59 loc) · 1.93 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
# Futurix AI - Development Startup Script
# This script starts both backend and frontend servers
echo "🚀 Starting Futurix AI Development Environment..."
echo ""
# Check if Python virtual environment exists
if [ ! -d "venv" ]; then
echo "❌ Virtual environment not found. Please run:"
echo " python -m venv venv"
echo " source venv/bin/activate"
echo " pip install -r requirements.txt"
exit 1
fi
# Check if frontend dependencies are installed
if [ ! -d "frontend/node_modules" ]; then
echo "📦 Installing frontend dependencies..."
cd frontend
npm install
cd ..
echo "✅ Frontend dependencies installed"
echo ""
fi
# Function to cleanup on exit
cleanup() {
echo ""
echo "🛑 Shutting down servers..."
kill $BACKEND_PID 2>/dev/null
kill $FRONTEND_PID 2>/dev/null
exit 0
}
trap cleanup SIGINT SIGTERM
# Start backend
echo "🔧 Starting Backend Server (FastAPI)..."
source venv/bin/activate
uvicorn app.main:app --reload --port 8000 &
BACKEND_PID=$!
echo "✅ Backend running on http://localhost:8000 (PID: $BACKEND_PID)"
echo ""
# Wait for backend to start
sleep 3
# Start frontend
echo "⚛️ Starting Frontend Server (React + Vite)..."
cd frontend
npm run dev &
FRONTEND_PID=$!
cd ..
echo "✅ Frontend running on http://localhost:3000 (PID: $FRONTEND_PID)"
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🎉 Futurix AI is ready!"
echo ""
echo "📊 Dashboard: http://localhost:3000"
echo "🔍 API Docs: http://localhost:8000/docs"
echo "💚 Health Check: http://localhost:8000/health/"
echo ""
echo "Press Ctrl+C to stop all servers"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# Wait for processes
wait