-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.ps1
More file actions
51 lines (43 loc) · 1.88 KB
/
Copy pathstart.ps1
File metadata and controls
51 lines (43 loc) · 1.88 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<#
.SYNOPSIS
Start AI Table — backend + frontend in one command.
.DESCRIPTION
Opens two new PowerShell windows:
• Backend — uvicorn (FastAPI, port 8000)
• Frontend — Vite dev server (port 5173)
.USAGE
.\start.ps1
Stop: close the two terminal windows, or Ctrl+C in each.
#>
$Root = $PSScriptRoot
# ── Backend ────────────────────────────────────────────────────────────────────
$backendCmd = @"
`$host.UI.RawUI.WindowTitle = 'AI Table — Backend'
Set-Location '$Root\backend'
& '.\.venv\Scripts\Activate.ps1'
Write-Host ''
Write-Host ' AI Table Backend' -ForegroundColor Cyan
Write-Host ' http://localhost:8000' -ForegroundColor DarkCyan
Write-Host ''
uvicorn main:app --reload
"@
# ── Frontend ───────────────────────────────────────────────────────────────────
$frontendCmd = @"
`$host.UI.RawUI.WindowTitle = 'AI Table — Frontend'
Set-Location '$Root\frontend'
Write-Host ''
Write-Host ' AI Table Frontend' -ForegroundColor Magenta
Write-Host ' http://localhost:5173' -ForegroundColor DarkMagenta
Write-Host ''
npm run dev
"@
Start-Process powershell -ArgumentList "-NoExit", "-Command", $backendCmd
Start-Process powershell -ArgumentList "-NoExit", "-Command", $frontendCmd
Write-Host ""
Write-Host " AI Table starting..." -ForegroundColor Green
Write-Host " Backend → http://localhost:8000" -ForegroundColor Cyan
Write-Host " Frontend → http://localhost:5173" -ForegroundColor Magenta
Write-Host ""
Write-Host " Open http://localhost:5173 in your browser." -ForegroundColor White
Write-Host " Close the two terminal windows to stop." -ForegroundColor DarkGray
Write-Host ""