()
| 42 | const proxy = createProxyServer(); |
| 43 | |
| 44 | function randomTarget() { |
| 45 | return [ |
| 46 | "http://localhost:3001", |
| 47 | "http://localhost:3002", |
| 48 | "http://localhost:3003", |
| 49 | ][Math.floor(Math.random() * 3)]; |
| 50 | } |
| 51 | |
| 52 | const httpServer = createServer((req, res) => { |
| 53 | proxy.web(req, res, { target: randomTarget() }); |