_scripts/generate-search.sh#!/bin/bashecho "🔨 Building site..."npm run build || exit 1echo ""echo "🚀 Starting server..."npm run start &SERVER_PID=$!# Give the server a moment to fail if there's an immediate errorsleep 2# Check if the server process is still runningif ! ps -p $SERVER_PID > /dev/null 2>&1; thenecho "❌ Server failed to start (process died immediately)"echo "💡 Check if port 3000 is already in use or if there are other startup errors"exit 1fi
Showing the first 20 lines.
Get full code