File size: 2,029 Bytes
0e0fe0a | 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 | # appsONLINE Launcher - PowerShell Script
# This script launches the appsONLINE application
Write-Host "`n╔════════════════════════════════════════╗" -ForegroundColor Cyan
Write-Host "║ appsONLINE Launcher ║" -ForegroundColor Cyan
Write-Host "║ MVC Application Management ║" -ForegroundColor Cyan
Write-Host "╚════════════════════════════════════════╝`n" -ForegroundColor Cyan
# Check if Node.js is installed
$nodeCheck = Get-Command node -ErrorAction SilentlyContinue
if ($null -eq $nodeCheck) {
Write-Host "❌ Error: Node.js is not installed!" -ForegroundColor Red
Write-Host ""
Write-Host "Please download and install Node.js from:" -ForegroundColor Yellow
Write-Host "https://nodejs.org/" -ForegroundColor Cyan
Write-Host ""
exit 1
}
$nodeVersion = & node --version
Write-Host "✅ Node.js $nodeVersion found" -ForegroundColor Green
Write-Host ""
# Check if npm packages are installed
$nodeModulesPath = Join-Path -Path $PSScriptRoot -ChildPath "node_modules"
if (-not (Test-Path -Path $nodeModulesPath)) {
Write-Host "📦 Installing dependencies (first time)..." -ForegroundColor Yellow
npm install
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ Failed to install dependencies!" -ForegroundColor Red
exit 1
}
Write-Host "✅ Dependencies installed" -ForegroundColor Green
Write-Host ""
}
Write-Host "🚀 Starting appsONLINE launcher..." -ForegroundColor Green
Write-Host ""
Write-Host "The application will open in a new window." -ForegroundColor Yellow
Write-Host "Press Ctrl+C to stop the application." -ForegroundColor Yellow
Write-Host ""
# Start the application
npm start
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ Error starting the application!" -ForegroundColor Red
Write-Host ""
}
|