fix: Ensure server port is free before startup by killing existing processes.

This commit is contained in:
diegosouzapw
2026-02-13 20:59:11 -03:00
parent 7ff1ba978a
commit 80cc76d531

View File

@@ -75,6 +75,10 @@ if [ $? -ne 0 ]; then
fi
echo ""
# Garante que a porta está livre antes de iniciar (build pode ter ocupado)
fuser -k $PORT/tcp 2>/dev/null
sleep 1
echo "🚀 Iniciando servidor na porta $PORT..."
LOG_FILE="/tmp/omniroute.log"
> "$LOG_FILE"