$ErrorActionPreference = 'Stop'

$root = Split-Path -Parent $PSScriptRoot
$php = Join-Path $root 'runtime\php\php.exe'
$mockPort = if ($env:CIOT_NOVO_MOCK_PORT) { $env:CIOT_NOVO_MOCK_PORT } else { '8093' }

Write-Host "Mock CIOT servidor novo: http://127.0.0.1:$mockPort/api/v1"

& $php -S "127.0.0.1:$mockPort" -t (Join-Path $root 'mock-provider\public')
