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