-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
49 lines (39 loc) · 910 Bytes
/
Copy pathstart.sh
File metadata and controls
49 lines (39 loc) · 910 Bytes
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
#!/bin/bash
echo "🧠 Starting Cortex..."
# Check if .env exists
if [ ! -f .env ]; then
echo "❌ .env file not found. Run ./install.sh first"
exit 1
fi
# Start backend in background
echo "🐍 Starting Python backend..."
cd backend
source venv/bin/activate
python main.py &
BACKEND_PID=$!
cd ..
# Wait for backend to start
sleep 3
# Start frontend in background
echo "⚛️ Starting Next.js frontend..."
cd frontend
npm run dev &
FRONTEND_PID=$!
cd ..
# Wait for frontend to start
sleep 5
# Start Electron
echo "🖥️ Starting Electron app..."
cd electron
npm start &
ELECTRON_PID=$!
cd ..
echo ""
echo "✅ Cortex is running!"
echo " Backend: http://localhost:8000"
echo " Frontend: http://localhost:3000"
echo ""
echo "Press Ctrl+C to stop all services"
# Wait for Ctrl+C
trap "echo 'Stopping Cortex...'; kill $BACKEND_PID $FRONTEND_PID $ELECTRON_PID 2>/dev/null; exit" INT
wait