-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·32 lines (26 loc) · 859 Bytes
/
start.sh
File metadata and controls
executable file
·32 lines (26 loc) · 859 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
#!/bin/bash
# Startup script for the Coding Journey Tracker with AI Tools
echo "🚀 Starting Coding Journey Tracker with Gemini AI..."
echo ""
# Check if GOOGLE_API_KEY is set
if [ -z "$GOOGLE_API_KEY" ]; then
echo "⚠️ WARNING: GOOGLE_API_KEY is not set!"
echo "Get your API key from: https://ai.google.dev/"
echo "Then set it in your .env file or as an environment variable:"
echo ""
echo "export GOOGLE_API_KEY='your-api-key-here'"
echo ""
fi
# Start the Python AI server in the background
echo "📦 Starting AI Server..."
cd "$(dirname "$0")/server"
python3 -m uvicorn ai_server:app --host 0.0.0.0 --port 4000 &
SERVER_PID=$!
cd ..
# Give the server time to start
sleep 2
# Start the React development server
echo "🎨 Starting React Development Server..."
npm run dev
# Cleanup when done
trap "kill $SERVER_PID" EXIT