(host: string, port: number)
| 249 | } |
| 250 | |
| 251 | function localPublicBaseUrl(host: string, port: number): string { |
| 252 | const publicHost = host === "0.0.0.0" || host === "::" ? "127.0.0.1" : host; |
| 253 | const formattedHost = publicHost.includes(":") && !publicHost.startsWith("[") |
| 254 | ? `[${publicHost}]` |
| 255 | : publicHost; |
| 256 | return `http://${formattedHost}:${port}`; |
| 257 | } |