Skip to content

Latest commit

 

History

History
114 lines (88 loc) · 3.12 KB

File metadata and controls

114 lines (88 loc) · 3.12 KB

Windows PowerShell Setup Guide

🚀 Quick Setup for Windows Demo

Step 1: Prerequisites Check

# Check PowerShell version (should be 5.0+)
$PSVersionTable.PSVersion

# Check Node.js (should be 18+)
node --version
npm --version

# Check Java (optional - will be downloaded if missing)
java -version

Step 2: Set Execution Policy (if needed)

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Step 3: Run the Application

# Option A: Simple runner (recommended for demo)
.\run-simple.ps1

# Option B: Advanced runner with auto-download
.\run.ps1

# Option C: VS Code tasks
# Open in VS Code → Ctrl+Shift+P → "Tasks: Run Task" → "Run All"

Step 4: Verify Everything Works

# Wait 60 seconds for both servers to start, then run:
.\verify.ps1

📱 Demo URLs

Once running, these URLs should work:

Frontend (Main Demo):

Backend APIs:

🎯 Demo Script

  1. Open http://localhost:4200
  2. Type "dept01" and click Search → Shows 4 employees
  3. Click "View" on John Doe → Shows employee details
  4. Click "Edit" → Modify salary to 98000, click Save
  5. Go back and search "dept01" again → Verify change
  6. Click "Delete" on an employee → Confirm deletion
  7. Click "Download PDF Report" in nav → PDF downloads
  8. Click "Cards Showcase" in nav → Shows product cards
  9. Visit http://localhost:8080/cards.html → Static version

🔧 Troubleshooting

If Java is Missing

The scripts will attempt to download Java automatically. If this fails:

  1. Download Java 17 from https://adoptium.net/temurin/releases/?version=17
  2. Install and restart PowerShell
  3. Run the script again

If Ports are Busy

# Kill existing processes
Get-Process | Where-Object {$_.ProcessName -match "java|node"} | Stop-Process -Force

# Or find specific process
netstat -ano | findstr :8080
taskkill /PID <PID> /F

If Scripts Won't Run

# Set execution policy
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

# Run with explicit bypass
PowerShell -ExecutionPolicy Bypass -File run-simple.ps1

✅ Success Indicators

You know it's working when:

  • ✅ Two PowerShell windows open (server and client)
  • ✅ Browser opens to http://localhost:4200 automatically
  • ✅ You can search for "dept01" and see 4 employees
  • ✅ PDF downloads when clicking the nav button
  • ✅ All URLs in the demo script respond correctly

🎉 Ready for Demo!

The system is now ready for live demonstration. All features work:

  • Complete CRUD operations
  • PDF report generation
  • Static content serving
  • Responsive Angular UI
  • H2 database with sample data
  • Transaction management with rollback
  • Error handling and validation