(port: number)
| 173 | } |
| 174 | |
| 175 | async function readHealth(port: number): Promise<HealthResponse | null> { |
| 176 | try { |
| 177 | const response = await fetch(`http://127.0.0.1:${port}/health`); |
| 178 | if (!response.ok) { |
| 179 | return null; |
| 180 | } |
| 181 | return (await response.json()) as HealthResponse; |
| 182 | } catch { |
| 183 | return null; |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | function parseLinuxStatus(pid: number) { |
| 188 | if (process.platform !== "linux") { |