-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.ps1
More file actions
35 lines (29 loc) · 1.06 KB
/
dev.ps1
File metadata and controls
35 lines (29 loc) · 1.06 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
# Container Maker Development Script
# Starts both frontend (watch/build) and backend
Write-Host "🚀 Starting Container Maker Development Environment..." -ForegroundColor Green
# Check for Node.js
if (!(Get-Command node -ErrorAction SilentlyContinue)) {
Write-Error "Node.js is required for development/building frontend. Please install it."
exit 1
}
# Check for Go
if (!(Get-Command go -ErrorAction SilentlyContinue)) {
Write-Error "Go is required for backend. Please install it."
exit 1
}
# Build Frontend (One-time build for embed, but we can also run dev server if needed)
Write-Host "📦 Building Frontend..." -ForegroundColor Cyan
Set-Location "cloud\ui"
npm install
npm run build
if ($LASTEXITCODE -ne 0) {
Write-Error "Frontend build failed"
exit 1
}
Set-Location "..\.."
# Run Backend
Write-Host "🔥 Starting Backend (with embedded frontend)..." -ForegroundColor Green
Write-Host "👉 Open http://localhost:8080 in your browser" -ForegroundColor Yellow
# Set CGO_ENABLED=0 to ensure pure Go build
$env:CGO_ENABLED = "0"
go run ./cmd/server