-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
37 lines (30 loc) · 912 Bytes
/
start.sh
File metadata and controls
37 lines (30 loc) · 912 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
#!/bin/bash
echo "========================================"
echo " Math Assistant - Démarrage"
echo "========================================"
echo ""
echo "[1/2] Démarrage du backend..."
cd backend
source venv/bin/activate 2>/dev/null || python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt > /dev/null 2>&1
python main.py &
BACKEND_PID=$!
cd ..
sleep 3
echo "[2/2] Démarrage du frontend..."
cd frontend
npm install > /dev/null 2>&1
npm run dev &
FRONTEND_PID=$!
cd ..
echo ""
echo "========================================"
echo " Les deux serveurs sont en cours de démarrage"
echo " Frontend: http://localhost:5173"
echo " Backend: http://localhost:8000"
echo "========================================"
echo ""
echo "Appuyez sur Ctrl+C pour arrêter les serveurs"
# Attendre que l'utilisateur appuie sur Ctrl+C
trap "kill $BACKEND_PID $FRONTEND_PID; exit" INT
wait