#!/bin/bash echo "๐Ÿงช Testing Portal Environment Configuration" echo "==========================================" # Check if .env file exists if [ -f ".env" ]; then echo "โœ… .env file found" echo "๐Ÿ“„ Contents:" cat .env echo "" else echo "โŒ .env file not found" exit 1 fi # Check if Trunk.toml exists and has env = true if [ -f "Trunk.toml" ]; then echo "โœ… Trunk.toml found" if grep -q "env = true" Trunk.toml; then echo "โœ… Environment variable support enabled in Trunk.toml" else echo "โŒ Environment variable support not enabled in Trunk.toml" echo "๐Ÿ’ก Add 'env = true' to your Trunk.toml" fi echo "" else echo "โŒ Trunk.toml not found" fi # Test environment variable echo "๐Ÿ” Testing PORTAL_API_KEY environment variable:" if [ -n "$PORTAL_API_KEY" ]; then echo "โœ… PORTAL_API_KEY is set: $PORTAL_API_KEY" else echo "โŒ PORTAL_API_KEY is not set" echo "๐Ÿ’ก Run: export PORTAL_API_KEY=dev_key_123" fi echo "" echo "๐Ÿš€ To test the portal with proper environment setup:" echo "1. export PORTAL_API_KEY=dev_key_123" echo "2. trunk serve --open" echo "" echo "๐Ÿ”ง Check browser console for debugging logs when making requests"