app.post("/", (req, res) => { const origin = req.body.origin; const destination = req.body.destination; const urlOri = "https://api.openweathermap.org/data/2.5/weather?q=" + origin + "&APPID={mykey}" https.get(urlOri, function (response) { console.log(response); }) });He escrito este código y estoy recibiendo este error:
Server started on port 443 events.js:292 throw er; // Unhandled 'error' event ^ Error: connect ETIMEDOUT 178.128.25.248:443 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) Emitted 'error' event on ClientRequest instance at: at TLSSocket.socketErrorListener (_http_client.js:469:9) at TLSSocket.emit (events.js:315:20) at emitErrorNT (internal/streams/destroy.js:106:8) at emitErrorCloseNT (internal/streams/destroy.js:74:3) at processTicksAndRejections (internal/process/task_queues.js:80:21) { errno: -4039, code: 'ETIMEDOUT', syscall: 'connect', address: '178.128.25.248', port: 443 }Este mismo código se ejecuta en una de las PC de mi amigo tal como se esperaba, ¿qué hacer?
Intenté hacer lo mismo a través de la solicitud y el módulo axios también y obtuve el mismo error.
Lo siento chicos, estaba usando un servidor proxy. Lo deshabilité y ahora funciona bien.