# Serve the ACG website showcase locally, then open it.
# Usage:  powershell -ExecutionPolicy Bypass -File serve.ps1  [port]
param([int]$Port = 4327)
$ErrorActionPreference = "Stop"
Set-Location -Path $PSScriptRoot
Write-Host "Arizona Computer Guru - showcase" -ForegroundColor Yellow
Write-Host "Serving $PSScriptRoot at http://localhost:$Port/  (Ctrl+C to stop)"
Start-Process "http://localhost:$Port/"
# Prefer the launcher 'py'; fall back to python.
$pyCmd = (Get-Command py -ErrorAction SilentlyContinue)
if ($pyCmd) { py -m http.server $Port } else { python -m http.server $Port }
