forked from meswork/HL_MES_manager_ai
14 lines
358 B
PowerShell
14 lines
358 B
PowerShell
$ErrorActionPreference = 'Stop'
|
|
|
|
$port = if ($env:PORT) { [int]$env:PORT } else { 8787 }
|
|
$url = "http://127.0.0.1:$port/health"
|
|
|
|
try {
|
|
$health = Invoke-RestMethod -Uri $url -Method Get -TimeoutSec 3
|
|
Write-Host "AI MCP service is running: $url"
|
|
$health | ConvertTo-Json -Depth 5
|
|
} catch {
|
|
Write-Host "AI MCP service is not running on $url"
|
|
exit 1
|
|
}
|