-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-simple.ps1
More file actions
49 lines (39 loc) · 2.57 KB
/
run-simple.ps1
File metadata and controls
49 lines (39 loc) · 2.57 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
# HR Management System - Simple Windows Runner
# This script starts both servers with minimal setup
Write-Host "🚀 Starting HR Management System..." -ForegroundColor Green
Write-Host ""
# Kill any existing processes on our ports
Write-Host "🧹 Cleaning up existing processes..." -ForegroundColor Yellow
Get-Process | Where-Object {$_.ProcessName -match "java|node"} | Where-Object {$_.MainWindowTitle -match "8080|4200"} | Stop-Process -Force -ErrorAction SilentlyContinue
Write-Host "🔧 Starting Spring Boot server..." -ForegroundColor Blue
Start-Process powershell -ArgumentList "-Command", "cd '$PWD\server'; .\mvnw.cmd spring-boot:run" -WindowStyle Normal
Write-Host "⏳ Waiting 30 seconds for server to start..." -ForegroundColor Yellow
Start-Sleep -Seconds 30
Write-Host "🎨 Starting Angular client..." -ForegroundColor Blue
Start-Process powershell -ArgumentList "-Command", "cd '$PWD\client'; npm ci; npx ng serve --proxy-config proxy.conf.json --open" -WindowStyle Normal
Write-Host "⏳ Waiting 15 seconds for client to start..." -ForegroundColor Yellow
Start-Sleep -Seconds 15
Write-Host ""
Write-Host "🎉 HR Management System should be running!" -ForegroundColor Green
Write-Host ""
Write-Host "📱 URLs to test:" -ForegroundColor Cyan
Write-Host " Frontend App: http://localhost:4200" -ForegroundColor White
Write-Host " API Departments: http://localhost:8080/api/departments" -ForegroundColor White
Write-Host " API Employees: http://localhost:8080/api/employees" -ForegroundColor White
Write-Host " PDF Report: http://localhost:8080/api/reports/employees-by-department.pdf" -ForegroundColor White
Write-Host " Static Cards: http://localhost:8080/cards.html" -ForegroundColor White
Write-Host " H2 Console: http://localhost:8080/h2-console" -ForegroundColor White
Write-Host ""
# Open the main application
Start-Process "http://localhost:4200"
Start-Process "http://localhost:8080/api/departments"
Write-Host "🔧 Demo Instructions:" -ForegroundColor Cyan
Write-Host " 1. Open http://localhost:4200" -ForegroundColor White
Write-Host " 2. Type 'dept01' in search box and click Search" -ForegroundColor White
Write-Host " 3. Click 'View' on any employee to see details" -ForegroundColor White
Write-Host " 4. Try editing employee information" -ForegroundColor White
Write-Host " 5. Download PDF report from navigation" -ForegroundColor White
Write-Host " 6. Visit Cards Showcase in navigation" -ForegroundColor White
Write-Host ""
Write-Host "Press any key to exit..." -ForegroundColor Yellow
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")