Skip to content

Commit c2da546

Browse files
author
Bart Koelman
committed
more logging
1 parent 73c88e0 commit c2da546

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/generate-examples.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
function Kill-WebServer {
66
$processId = $null
77
if ($IsMacOs || $IsLinux) {
8-
$processId = $(lsof -ti:8080)
8+
$processId = $(lsof -ti:14141)
99
}
1010
elseif ($IsWindows) {
1111
$processId = $(Get-NetTCPConnection -LocalPort 14141 -ErrorAction SilentlyContinue).OwningProcess
1212
}
13+
else {
14+
throw [System.Exception] "Unsupported operating system."
15+
}
1316

1417
if ($processId -ne $null) {
1518
Write-Output "Stopping web server"
@@ -20,7 +23,7 @@ function Kill-WebServer {
2023

2124
function Start-Webserver {
2225
Write-Output "Starting web server"
23-
Start-Job -ScriptBlock { dotnet run --project ..\src\Examples\GettingStarted\GettingStarted.csproj } | Out-Null
26+
Start-Job -ScriptBlock { dotnet run --project ..\src\Examples\GettingStarted\GettingStarted.csproj }
2427
}
2528

2629
Kill-WebServer

0 commit comments

Comments
 (0)