-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-dev.sh
More file actions
executable file
·47 lines (38 loc) · 1011 Bytes
/
start-dev.sh
File metadata and controls
executable file
·47 lines (38 loc) · 1011 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
# DropIt Development Startup Script
echo "🚚 Starting DropIt Development Environment..."
echo ""
# Check if .env files exist
if [ ! -f backend/.env ]; then
echo "⚠️ Backend .env file not found!"
echo "Please copy backend/.env.example to backend/.env and configure it"
exit 1
fi
if [ ! -f frontend/.env ]; then
echo "⚠️ Frontend .env file not found!"
echo "Please copy frontend/.env.example to frontend/.env and configure it"
exit 1
fi
# Start backend
echo "🔧 Starting Backend Server..."
cd backend
npm run dev &
BACKEND_PID=$!
cd ..
# Wait a bit for backend to start
sleep 3
# Start frontend
echo "🎨 Starting Frontend Development Server..."
cd frontend
npm run dev &
FRONTEND_PID=$!
cd ..
echo ""
echo "✅ Development servers started!"
echo "📍 Backend API: http://localhost:5000"
echo "📍 Frontend: http://localhost:5173"
echo ""
echo "Press Ctrl+C to stop all servers"
# Wait for Ctrl+C
trap "kill $BACKEND_PID $FRONTEND_PID; exit" INT
wait