-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
44 lines (34 loc) · 1.02 KB
/
Copy pathstart.sh
File metadata and controls
44 lines (34 loc) · 1.02 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
#!/bin/bash
# Start script for AI Pair-Programmer Interview Room
echo "🚀 Starting AI Pair-Programmer Interview Room..."
echo ""
# Check if .env exists
if [ ! -f .env ]; then
echo "❌ .env file not found!"
echo "Please run ./setup.sh first or create .env from .env.example"
echo "Don't forget to add your Groq API key (get it at https://console.groq.com)"
exit 1
fi
# Check if virtual environment exists
if [ ! -d "venv" ]; then
echo "❌ Virtual environment not found!"
echo "Please run ./setup.sh first"
exit 1
fi
# Activate virtual environment
echo "🔧 Activating virtual environment..."
source venv/bin/activate
# Start backend in background
echo "🐍 Starting backend server..."
uvicorn backend.main:app --reload --port 8000 &
BACKEND_PID=$!
# Wait for backend to start
echo "⏳ Waiting for backend to start..."
sleep 3
# Start frontend
echo "⚛️ Starting frontend..."
cd client
npm start
# Cleanup on exit
trap "echo ''; echo '🛑 Shutting down...'; kill $BACKEND_PID; exit" INT TERM
wait