-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.ps1
More file actions
27 lines (23 loc) · 1.02 KB
/
Copy pathstart.ps1
File metadata and controls
27 lines (23 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Start Datrix dev environment
# Run from the Datrix/ root directory
Write-Host "Starting Datrix backend (FastAPI on :8000)..." -ForegroundColor Cyan
$backend = Start-Process -FilePath ".\backend\.venv\Scripts\python.exe" `
-ArgumentList "run.py", "--reload" `
-WorkingDirectory ".\backend" -PassThru
Write-Host "Starting Datrix frontend (Vite on :5173)..." -ForegroundColor Cyan
$node = (Get-Command npm).Source
$frontend = Start-Process -FilePath $node `
-ArgumentList "run", "dev" `
-WorkingDirectory ".\frontend" -PassThru
Write-Host ""
Write-Host " Backend: http://localhost:8000" -ForegroundColor Green
Write-Host " Frontend: http://localhost:5173" -ForegroundColor Green
Write-Host " API docs: http://localhost:8000/docs" -ForegroundColor Green
Write-Host ""
Write-Host "Press Ctrl+C to stop both servers." -ForegroundColor Yellow
try {
Wait-Process -Id $backend.Id
} finally {
Stop-Process -Id $backend.Id -ErrorAction SilentlyContinue
Stop-Process -Id $frontend.Id -ErrorAction SilentlyContinue
}