File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 55function 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
2124function 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
2629Kill- WebServer
You can’t perform that action at this time.
0 commit comments