diff --git a/StackMonkey.ps1 b/StackMonkey.ps1 index 01c9d97..be40c6c 100644 --- a/StackMonkey.ps1 +++ b/StackMonkey.ps1 @@ -400,6 +400,15 @@ function Write-LogHybrid { return } + + 'UI' { + Write-LogHybrid "Launching UI" Info Startup + Write-Host "Starting ScriptMonkey UI on http://localhost:$Port/" -ForegroundColor Cyan + Start-Process "msedge.exe" -ArgumentList "--app=http://localhost:$Port" + Start-Server # blocks until you click Exit + return + } + } #endregion ScriptMonkey run silently Entrypoint @@ -1553,7 +1562,7 @@ function Start-Server { #endregion -# Only launch the UI if we’re in the default UI parameter set +# Only launch the UI if we're in the default UI parameter set if ($PSCmdlet.ParameterSetName -eq 'UI') { # now that $Port is defined, show it properly: Write-Host "Starting ScriptMonkey UI on http://localhost:$Port/" -ForegroundColor Cyan