Files
AgentCoord/backend/restart.ps1

13 lines
363 B
PowerShell
Raw Normal View History

2025-12-07 17:18:10 +08:00
# restart.ps1
$port=8000
$env:PYTHONUNBUFFERED="1"
python server.py --port 8000
Write-Host "Killing PID on port $port..." -ForegroundColor Red
Get-NetTCPConnection -LocalPort $port -ErrorAction SilentlyContinue | ForEach-Object {
Stop-Process -Id $_.OwningProcess -Force
}
Write-Host "Starting Flask..." -ForegroundColor Green
python server.py --port $port