#!/bin/bash # Smart Parking Finder - Backend Global Access echo "🌐 Starting Backend for Global Access..." # Start backend cd backend npm run start:dev & BACKEND_PID=$! # Wait for backend to start sleep 3 # Start ngrok for backend echo "🔗 Creating global tunnel for backend..." ngrok http 3001 & BACKEND_NGROK_PID=$! echo "✅ Backend is now accessible globally!" echo "📋 Update frontend API URL with the ngrok URL" # Cleanup function cleanup() { echo "🛑 Stopping backend services..." kill $BACKEND_PID 2>/dev/null kill $BACKEND_NGROK_PID 2>/dev/null exit } trap cleanup INT wait