()
| 18 | #server: Server; |
| 19 | |
| 20 | static randomPort() { |
| 21 | /** |
| 22 | * Some ports are restricted by Chromium and will fail to connect |
| 23 | * to prevent we start after the |
| 24 | * |
| 25 | * https://source.chromium.org/chromium/chromium/src/+/main:net/base/port_util.cc;l=107?q=kRestrictedPorts&ss=chromium |
| 26 | */ |
| 27 | const min = 10101; |
| 28 | const max = 20202; |
| 29 | return Math.floor(Math.random() * (max - min + 1) + min); |
| 30 | } |
| 31 | |
| 32 | #routes: Record<string, (req: IncomingMessage, res: ServerResponse) => void> = |
| 33 | {}; |
no outgoing calls
no test coverage detected