From e72f6ef268c42b2c72ad31a3cc8d055610576d41 Mon Sep 17 00:00:00 2001 From: Yann MAHE Date: Mon, 24 Nov 2025 13:13:19 -0500 Subject: [PATCH] Remove dev server readiness check from setup script The 60-second polling loop that waits for the dev server to respond adds unnecessary setup time. The warmup step that follows already has a timeout, so we can proceed directly to it. --- niteshift-setup.sh | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/niteshift-setup.sh b/niteshift-setup.sh index 026e8134..6405cdf8 100755 --- a/niteshift-setup.sh +++ b/niteshift-setup.sh @@ -192,26 +192,7 @@ pnpm run dev >> "$LOG_FILE" 2>&1 & SERVER_PID=$! log "✓ Dev server started with PID $SERVER_PID" -# 7. Wait for dev server to be ready -log "Waiting for dev server to be ready (this may take 30-60 seconds on first run)..." -MAX_ATTEMPTS=60 -ATTEMPT=0 -while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do - if curl -s -o /dev/null -w "%{http_code}" http://localhost:3001/api/heartbeat 2>/dev/null | grep -q "200"; then - log "✓ Dev server is ready and responding" - break - fi - ATTEMPT=$((ATTEMPT + 1)) - if [ $ATTEMPT -eq $MAX_ATTEMPTS ]; then - log_error "Dev server failed to start within 60 seconds" - log_error "Check the log file for details: $LOG_FILE" - kill $SERVER_PID 2>/dev/null || true - exit 1 - fi - sleep 1 -done - -# 8. Warm up the main application routes +# 7. Warm up the main application routes log "Warming up main application routes..." if curl -s -o /dev/null --max-time 30 http://localhost:3001/ 2>/dev/null; then log "✓ Main routes pre-compiled"