#!/bin/bash
# Start dev server with fresh AlloyDB access token

echo "🔑 Generating AlloyDB access token..."
export ALLOYDB_PASSWORD=$(gcloud auth print-access-token)

if [ -z "$ALLOYDB_PASSWORD" ]; then
  echo "❌ Failed to generate access token"
  echo "Make sure you're logged in: gcloud auth login"
  exit 1
fi

echo "✅ Token generated (expires in 1 hour)"
echo "🚀 Starting dev server..."
echo ""

npm run dev

