Initial commit: SIBU 2.0 MISSION
This commit is contained in:
25
old/scripts/run-flutter-backend.sh
Normal file
25
old/scripts/run-flutter-backend.sh
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Run Flutter app with backend API connection
|
||||
# This script runs Flutter with the backend API URL configured
|
||||
|
||||
set -e
|
||||
|
||||
# Navigate to project root
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Get API URL from environment or use default
|
||||
API_BASE_URL="${API_BASE_URL:-http://localhost:8000}"
|
||||
|
||||
# Determine device (default to chrome for web)
|
||||
DEVICE="${1:-chrome}"
|
||||
|
||||
echo "🚀 Running Flutter app with backend API..."
|
||||
echo " API URL: $API_BASE_URL"
|
||||
echo " Device: $DEVICE"
|
||||
echo ""
|
||||
|
||||
# Run Flutter with environment variables
|
||||
flutter run -d "$DEVICE" \
|
||||
--dart-define=API_BASE_URL="$API_BASE_URL"
|
||||
|
||||
Reference in New Issue
Block a user