title: Why Is My API Response Not Automatically Being Logged To My Terminal Console?
body: <p>I'm just starting to delve into Api's via a course and essentially I am trying to pull in data from the open weather api for London. It's  working IF i manually request it to console log the response via terminal (I'm on MAC) but not doing so automatically, even though it's referenced in the code. I'll paste my code below but remove my api key for obvious reasons.</p>
  <p>Any help would be appreciated, thanks in advance for  your time.</p>
  <pre><code>const express = require('express');
  const https = require('https');
  const app = express();
  const port = 3000;
  const url = 'https://api.openweathermap.org/data/2.5/weather?q=London&amp;appid=12345mykeyexample'; 
  
  //set route as index.html
  app.get('/', (req, res) =&gt; {
    res.sendFile(__dirname + '/index.html');
    
    //get api url and console log response
    https.get(url, function(response){
      console.log(response);
    });
    res.send('server is up and running bro');
  });
  
  
  // listen on port 3000
  app.listen(port, () =&gt; {
    console.log(`Server started bro http://localhost:${port}`);
  }); 
  </code></pre>