CoompanionApp/mobile/scripts/start-dev.sh

16 lines
381 B
Bash
Raw Normal View History

2026-02-03 13:48:56 +01:00
#!/bin/sh
set -e
IP="$(ipconfig getifaddr en0 2>/dev/null || true)"
if [ -z "$IP" ]; then
IP="$(ipconfig getifaddr en1 2>/dev/null || true)"
fi
if [ -z "$IP" ]; then
echo "Could not determine LAN IP (tried en0/en1)."
exit 1
fi
export EXPO_PUBLIC_DEV_API_BASE_URL="http://$IP:3000"
echo "Using EXPO_PUBLIC_DEV_API_BASE_URL=$EXPO_PUBLIC_DEV_API_BASE_URL"
exec npx expo start