-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.ps1
More file actions
37 lines (31 loc) · 1.27 KB
/
start.ps1
File metadata and controls
37 lines (31 loc) · 1.27 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
Write-Host "========================================" -ForegroundColor Cyan
Write-Host " Mobile Car Wash Manager - Quick Start" -ForegroundColor Cyan
Write-Host "========================================" -ForegroundColor Cyan
Write-Host ""
# Check if node is installed
try {
$null = Get-Command node -ErrorAction Stop
} catch {
Write-Host "ERROR: Node.js is not installed!" -ForegroundColor Red
Write-Host ""
Write-Host "Please install Node.js from: https://nodejs.org/" -ForegroundColor Yellow
Write-Host "Then run this script again." -ForegroundColor Yellow
Read-Host "Press Enter to exit"
exit 1
}
Write-Host "Checking dependencies..." -ForegroundColor Green
if (-not (Test-Path "node_modules")) {
Write-Host "Installing dependencies (this may take a minute)..." -ForegroundColor Yellow
npm install
if ($LASTEXITCODE -ne 0) {
Write-Host "ERROR: Failed to install dependencies" -ForegroundColor Red
Read-Host "Press Enter to exit"
exit 1
}
}
Write-Host ""
Write-Host "Starting app..." -ForegroundColor Green
Write-Host "The app will open in your browser automatically." -ForegroundColor Green
Write-Host "Press Ctrl+C to stop the server." -ForegroundColor Yellow
Write-Host ""
npm run dev