param([int]$Port = 54320)

. "$PSScriptRoot\db-local.ps1"

for ($i = 1; $i -le 30; $i++) {
  if (Test-DbPortOpen -Port $Port) { return 0 }
  Start-Sleep -Seconds 1
}

Write-Host "[ERROR] Database port $Port is not ready."
return 1
