File tree 2 files changed +16
-4
lines changed
2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 3
3
# This script generates response documents for ./request-examples
4
4
5
5
function Kill-WebServer {
6
- $tcpConnections = Get-NetTCPConnection - LocalPort 14141 - ErrorAction SilentlyContinue
7
- if ($tcpConnections -ne $null ) {
6
+ $processId = $null
7
+ if ($IsMacOs || $IsLinux ) {
8
+ $processId = $ (lsof - ti:8080 )
9
+ }
10
+ elseif ($IsWindows ) {
11
+ $processId = $ (Get-NetTCPConnection - LocalPort 14141 - ErrorAction SilentlyContinue).OwningProcess
12
+ }
13
+
14
+ if ($processId -ne $null ) {
8
15
Write-Output " Stopping web server"
9
- Get-Process - Id $tcpConnections .OwningProcess | Stop-Process
16
+ Get-Process - Id $processId | Stop-Process
10
17
}
18
+
11
19
}
12
20
13
21
function Start-Webserver {
Original file line number Diff line number Diff line change 3
3
< head >
4
4
< meta charset ="utf-8 ">
5
5
< meta content ="width=device-width, initial-scale=1.0 " name ="viewport ">
6
- < title > JsonApiDotNetCore </ title >
6
+ < title > JSON:API .NET Core </ title >
7
7
< meta content ="" name ="descriptison ">
8
8
< meta content ="" name ="keywords ">
9
9
< link href ="favicon.ico " rel ="icon ">
@@ -213,6 +213,10 @@ <h4 class="title">Response</h4>
213
213
"links": {
214
214
"self": "/articles/1/relationships/author",
215
215
"related": "/articles/1/author"
216
+ },
217
+ "data": {
218
+ "type": "people",
219
+ "id": "1"
216
220
}
217
221
}
218
222
},
You can’t perform that action at this time.
0 commit comments