Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

184
Views
Server crashes when making an API call
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);
    })
});

I have written this code and I am getting this 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
}

This same code runs on one of my friend's pc same as expected, what to do?

I have tried to do the same via request and axios module as well and I got the same error.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Sorry guys I was using a proxy server. I disabled it and now it's working fine

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!