Files
sciagent/scripts/start-frontends.ps1
Thinh Lam 688fac73e9
CI/CD / backend (push) Failing after 2m8s
CI/CD / frontend (push) Failing after 1m40s
CI/CD / deploy (push) Has been skipped
sciagent code + Gitea Actions CI/CD
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 09:38:30 +07:00

25 lines
1015 B
PowerShell

# 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