Want to create interactive content? It’s easy in Genially!

Get started free

#!/bin/bash # 🚖 Script para arrancar todo el proyecto # 1. Arrancar backend echo "▶️ Iniciando backend..." cd backend npm install npm run d

Gidelson Ortega

Created on September 13, 2025

Start designing with a free template

Discover more than 1500 professional designs like these:

Transcript

#!/bin/bash # 🚖 Script para arrancar todo el proyecto # 1. Arrancar backend echo "▶️ Iniciando backend..." cd backend npm install npm run dev & BACK_PID=$! cd .. # 2. Arrancar ngrok para exponer backend echo "🌐 Iniciando ngrok..." ngrok http 4000 > /dev/null & sleep 5 NGROK_URL=$(curl -s http://127.0.0.1:4040/api/tunnels | grep -o "https://[a-z0-9]*\.ngrok-free\.app" | head -n 1) if [ -z "$NGROK_URL" ]; then echo "❌ No se pudo obtener URL de ngrok. Asegúrate de tener ngrok instalado y autenticado." kill $BACK_PID exit 1 fi echo "✅ Backend público en: $NGROK_URL" # 3. Escribir la URL en el .env de mobile echo "BACKEND_URL=$NGROK_URL" > mobile/.env echo "📄 Variable escrita en mobile/.env" # 4. Arrancar Expo echo "📱 Iniciando app móvil con Expo..." cd mobile npm install npx expo start # Al salir, matar backend kill $BACK_PID 🔑 Necesitas tener ngrok instalado (brew install ngrok en Mac, o descargar desde ngrok.com).