-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstart-dev.sh
More file actions
executable file
·48 lines (36 loc) · 960 Bytes
/
start-dev.sh
File metadata and controls
executable file
·48 lines (36 loc) · 960 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
#!/bin/bash
# HR Manual Chat - Development Start Script
set -e
echo "🚀 Starting HR Manual Chat Development Environment"
# Check if .env file exists
if [ ! -f .env ]; then
echo "❌ .env file not found. Please run ./setup-dev.sh first."
exit 1
fi
# Function to cleanup background processes
cleanup() {
echo "🛑 Shutting down services..."
kill $BACKEND_PID $FRONTEND_PID 2>/dev/null || true
exit 0
}
# Set up signal handlers
trap cleanup SIGINT SIGTERM
# Start backend
echo "🐍 Starting backend API..."
source venv/bin/activate
python -m app.main &
BACKEND_PID=$!
# Wait a moment for backend to start
sleep 3
# Start frontend
echo "⚛️ Starting frontend..."
cd frontend
npm run dev &
FRONTEND_PID=$!
# Wait for both processes
echo "✅ Services started!"
echo " Backend: http://localhost:8080"
echo " Frontend: http://localhost:3000"
echo ""
echo "Press Ctrl+C to stop all services"
wait $BACKEND_PID $FRONTEND_PID