#!/bin/bash set -e echo "=== LangGraph Server Startup ===" cd /home/site/wwwroot # Ensure .env exists (may be empty; real config comes from Azure App Settings) touch .env mkdir -p .langgraph_api # Pre-create .gitignore entry to prevent tsx watch restart loop grep -q '.langgraph_api' .gitignore 2>/dev/null || echo '.langgraph_api' >> .gitignore echo "Starting LangGraph server on port ${PORT:-8080}..." exec npx langgraphjs dev --host 0.0.0.0 --port ${PORT:-8080} --no-browser