-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_backend.sh
More file actions
executable file
·35 lines (28 loc) · 887 Bytes
/
Copy pathstart_backend.sh
File metadata and controls
executable file
·35 lines (28 loc) · 887 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
#!/bin/bash
echo "Starting IdeaGraph Studio Backend..."
echo ""
# Check if we're in the right directory
if [ ! -f "backend/main.py" ]; then
echo "Error: Please run this script from the project root directory"
exit 1
fi
# Check if Python is available
if ! command -v python3 &> /dev/null; then
echo "Error: Python 3 is not installed"
exit 1
fi
# Check if dependencies are installed
if [ ! -d "backend/venv" ] && [ ! -d "backend/.venv" ]; then
echo "⚠️ Virtual environment not found. Installing dependencies..."
cd backend
pip3 install -r requirements.txt
cd ..
fi
# Start the backend
echo "🚀 Starting backend server on http://localhost:8000"
echo "📚 API docs will be available at http://localhost:8000/docs"
echo ""
echo "Press Ctrl+C to stop the server"
echo ""
cd backend
python3 -m uvicorn main:app --reload --host 0.0.0.0 --port 8000