-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-dev.sh
More file actions
executable file
Β·39 lines (32 loc) Β· 850 Bytes
/
start-dev.sh
File metadata and controls
executable file
Β·39 lines (32 loc) Β· 850 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
#!/bin/bash
echo "π Starting StarkPay Development Environment"
echo ""
# Check if MongoDB is running
echo "π Checking MongoDB connection..."
if ! nc -z localhost 27017 2>/dev/null; then
echo "β οΈ Warning: MongoDB doesn't appear to be running locally"
echo " Make sure MongoDB is running or update MONGODB_URI in .env"
fi
echo ""
echo "π§ Starting Backend Server..."
cd backend
npm run dev &
BACKEND_PID=$!
echo ""
echo "β³ Waiting for backend to start..."
sleep 5
echo ""
echo "π¨ Starting Frontend Server..."
cd ../frontend
npm run dev &
FRONTEND_PID=$!
echo ""
echo "β
Development servers started!"
echo ""
echo "π Frontend: http://localhost:3000"
echo "π Backend: http://localhost:3004"
echo ""
echo "Press Ctrl+C to stop all servers"
# Wait for Ctrl+C
trap "kill $BACKEND_PID $FRONTEND_PID; exit" INT
wait