(req: IncomingMessage, res: ServerResponse)
| 7 | import type { IncomingMessage, ServerResponse } from 'http' |
| 8 | |
| 9 | const defaultOnRequest = function (req: IncomingMessage, res: ServerResponse) { |
| 10 | console.log('HTTPS SERVER REQUEST URL:', req.url) |
| 11 | console.log('HTTPS SERVER REQUEST HEADERS:', req.headers) |
| 12 | |
| 13 | res.setHeader('Content-Type', 'text/html') |
| 14 | res.writeHead(200) |
| 15 | |
| 16 | res.end('<html><head></head><body>https server</body></html>') |
| 17 | } |
| 18 | |
| 19 | let servers: https.Server<typeof IncomingMessage, typeof ServerResponse>[] = [] |
| 20 |