-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.sh
More file actions
executable file
·54 lines (43 loc) · 1.34 KB
/
Copy pathdev.sh
File metadata and controls
executable file
·54 lines (43 loc) · 1.34 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
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# PathLine Development Server Launcher
# This script starts both frontend and backend servers
set -e
echo "🚀 Starting PathLine Development Servers..."
echo ""
# Colors for output
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Check if backend dependencies are installed
if [ ! -d "backend/.venv" ] && [ ! -f "backend/.env" ]; then
echo "⚠️ Backend not configured. Please run:"
echo " cd backend && pip install -r requirements.txt"
echo " cp backend/.env.example backend/.env"
exit 1
fi
# Check if frontend dependencies are installed
if [ ! -d "frontend/node_modules" ]; then
echo "⚠️ Frontend dependencies not installed. Please run:"
echo " cd frontend && npm install"
exit 1
fi
# Start backend in background
echo -e "${BLUE}Starting backend server...${NC}"
uvicorn backend.app.main:app --reload --host 0.0.0.0 --port 8000 &
BACKEND_PID=$!
# Wait a moment for backend to start
sleep 2
# Start frontend
echo -e "${GREEN}Starting frontend server...${NC}"
echo ""
echo "================================"
echo "Backend: http://localhost:8000"
echo "Frontend: http://localhost:3000"
echo "API Docs: http://localhost:8000/docs"
echo "================================"
echo ""
cd frontend
npm run dev
# Cleanup: kill backend when frontend stops
cd ..
kill $BACKEND_PID 2>/dev/null || true