forked from open-webui/open-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev-local.ps1
More file actions
19 lines (14 loc) · 858 Bytes
/
dev-local.ps1
File metadata and controls
19 lines (14 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
$backendScript = Join-Path $root "backend\dev.ps1"
if (-not (Test-Path $backendScript)) {
throw "Backend launcher not found: $backendScript"
}
$backendCmd = "Set-Location '$root\backend'; powershell -ExecutionPolicy Bypass -File '.\dev.ps1'"
$frontendCmd = "Set-Location '$root'; npm run dev"
Start-Process powershell -ArgumentList @('-NoExit', '-Command', $backendCmd) -WindowStyle Normal
Start-Sleep -Milliseconds 600
Start-Process powershell -ArgumentList @('-NoExit', '-Command', $frontendCmd) -WindowStyle Normal
Write-Host "Started backend and frontend in separate terminals." -ForegroundColor Green
Write-Host "Backend terminal: backend\dev.ps1 (http://localhost:8080)"
Write-Host "Frontend terminal: npm run dev (usually http://localhost:5173 or 5174)"