Files
pdf/scripts/start_gateway.ps1
T
2026-05-27 12:25:00 +05:30

24 lines
520 B
PowerShell

param (
[int]$Port = 0
)
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$gatewayDir = Join-Path (Split-Path -Parent $scriptDir) "gateway"
if ($Port -le 0) {
$envPort = $env:PORT -as [int]
if ($envPort) {
$Port = $envPort
} else {
$Port = 8000
}
}
Write-Host "Starting FastAPI Gateway local dev server on port $Port..." -ForegroundColor Cyan
Push-Location $gatewayDir
try {
& .venv\Scripts\uvicorn app.main:app --reload --port $Port
} finally {
Pop-Location
}