38 lines
1.3 KiB
PowerShell
38 lines
1.3 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
|
|
$projectRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
$backendScript = Join-Path $projectRoot 'start-local-backend.ps1'
|
|
$frontendScript = Join-Path $projectRoot 'start-local-frontend.ps1'
|
|
$logDir = Join-Path $projectRoot 'tmp_run'
|
|
|
|
New-Item -ItemType Directory -Path $logDir -Force | Out-Null
|
|
|
|
$backendOut = Join-Path $logDir 'backend.out.log'
|
|
$backendErr = Join-Path $logDir 'backend.err.log'
|
|
$frontendOut = Join-Path $logDir 'frontend.out.log'
|
|
$frontendErr = Join-Path $logDir 'frontend.err.log'
|
|
|
|
$backend = Start-Process -FilePath 'powershell.exe' `
|
|
-ArgumentList '-ExecutionPolicy', 'Bypass', '-File', $backendScript `
|
|
-WorkingDirectory $projectRoot `
|
|
-RedirectStandardOutput $backendOut `
|
|
-RedirectStandardError $backendErr `
|
|
-PassThru
|
|
|
|
Start-Sleep -Seconds 3
|
|
|
|
$frontend = Start-Process -FilePath 'powershell.exe' `
|
|
-ArgumentList '-ExecutionPolicy', 'Bypass', '-File', $frontendScript `
|
|
-WorkingDirectory $projectRoot `
|
|
-RedirectStandardOutput $frontendOut `
|
|
-RedirectStandardError $frontendErr `
|
|
-PassThru
|
|
|
|
Start-Sleep -Seconds 3
|
|
|
|
Write-Host "Backend PID: $($backend.Id)"
|
|
Write-Host "Frontend PID: $($frontend.Id)"
|
|
Write-Host 'Backend URL: http://127.0.0.1:8000'
|
|
Write-Host 'Frontend URL: http://127.0.0.1:5174'
|
|
Write-Host "Logs: $logDir"
|