-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-services.ps1
More file actions
62 lines (56 loc) · 2.14 KB
/
start-services.ps1
File metadata and controls
62 lines (56 loc) · 2.14 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
52
53
54
55
56
57
58
59
60
61
62
# 10x Team - Service Startup Script
# Developed by Team 10x.in
param(
[string]$Service = "all"
)
$services = @{
"dashboard" = @{
"name" = "Marketing Dashboard"
"port" = 3000
"path" = ".claude\skills\marketing-dashboard"
"command" = "npm run dev"
}
"canvas" = @{
"name" = "TLDraw Canvas"
"port" = 3001
"path" = "canvas"
"command" = "npm run dev"
}
"websocket" = @{
"name" = "WebSocket Server"
"port" = 3002
"path" = "canvas"
"command" = "node server.js"
}
}
Write-Host "================================" -ForegroundColor Cyan
Write-Host " 10x Team Services" -ForegroundColor Cyan
Write-Host " Developed by Team 10x.in" -ForegroundColor Gray
Write-Host "================================" -ForegroundColor Cyan
Write-Host ""
function Start-Service($key, $config) {
Write-Host "Starting $($config.name) on port $($config.port)..." -ForegroundColor Green
$fullPath = Join-Path $PSScriptRoot $config.path
Start-Process -FilePath "cmd" -ArgumentList "/c cd /d `"$fullPath`" && $($config.command)" -WindowStyle Normal
Write-Host " -> $($config.name) starting at http://localhost:$($config.port)" -ForegroundColor Yellow
}
if ($Service -eq "all") {
Write-Host "Starting all services..." -ForegroundColor Magenta
Write-Host ""
foreach ($key in $services.Keys) {
Start-Service $key $services[$key]
}
} elseif ($services.ContainsKey($Service)) {
Start-Service $Service $services[$Service]
} else {
Write-Host "Unknown service: $Service" -ForegroundColor Red
Write-Host "Available services: all, dashboard, canvas, websocket" -ForegroundColor Yellow
}
Write-Host ""
Write-Host "================================" -ForegroundColor Cyan
Write-Host " Port Assignments:" -ForegroundColor White
Write-Host " - Marketing Dashboard: 3000" -ForegroundColor Gray
Write-Host " - TLDraw Canvas: 3001" -ForegroundColor Gray
Write-Host " - WebSocket Server: 3002" -ForegroundColor Gray
Write-Host " - API Server: 3003" -ForegroundColor Gray
Write-Host "================================" -ForegroundColor Cyan