This commit is contained in:
saqib mir
2026-05-27 12:27:30 +05:30
3 changed files with 51 additions and 7 deletions
+15 -2
View File
@@ -1,10 +1,23 @@
param (
[int]$Port = 0
)
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$gatewayDir = Join-Path (Split-Path -Parent $scriptDir) "gateway"
Write-Host "Starting FastAPI Gateway local dev server..." -ForegroundColor Cyan
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
& .venv\Scripts\uvicorn app.main:app --reload --port $Port
} finally {
Pop-Location
}