param( [string]$RepoRoot = "F:\Workin In Progress\DESINEURON\GITLAB\Project_Velocity", [int]$Port = 8001 ) $ErrorActionPreference = "Stop" $env:VELOCITY_ENV_FILE = Join-Path $RepoRoot ".local-dev\backend\.env.local" if (-not (Test-Path $env:VELOCITY_ENV_FILE)) { throw "Missing local backend env file at $($env:VELOCITY_ENV_FILE). Import a local bundle first." } $pythonExe = Join-Path $RepoRoot ".venv\Scripts\python.exe" if (-not (Test-Path $pythonExe)) { $pythonExe = Join-Path $RepoRoot "venv\Scripts\python.exe" } if (-not (Test-Path $pythonExe)) { $pythonExe = "python" } Push-Location $RepoRoot try { & $pythonExe -m uvicorn backend.main:app --reload --host 127.0.0.1 --port $Port } finally { Pop-Location }