# Khởi động cả 2 frontend (fe0 + fe-admin) trong 2 PowerShell window riêng # Yêu cầu: Node.js 20+ đã cài $ErrorActionPreference = 'Stop' $root = Split-Path -Parent $PSScriptRoot function Start-Frontend { param([string]$Name, [string]$Path, [int]$Port) Write-Host "[$Name] Khởi động trên port $Port..." -ForegroundColor Cyan $cmd = "Set-Location '$Path'; if (-not (Test-Path node_modules)) { npm install }; npm run dev" Start-Process pwsh -ArgumentList '-NoExit', '-Command', $cmd -WindowStyle Normal } Start-Frontend -Name 'fe0 (User)' -Path "$root\fe0" -Port 8080 Start-Sleep -Seconds 2 Start-Frontend -Name 'fe-admin (Admin)' -Path "$root\fe-admin" -Port 8082 Write-Host "" Write-Host "✅ Đã khởi động 2 frontend:" -ForegroundColor Green Write-Host " - User UI: http://localhost:8080" Write-Host " - Admin UI: http://localhost:8082" Write-Host "" Write-Host "Backend .NET (DYD.Api) chạy riêng từ Visual Studio (F5)." -ForegroundColor Yellow