title: I get Promise { <pending> } as returned value and also calling in async scope gives me undefined immediately
body: <p>Im trying to return a value from a Promise in async-await form and use it in another function in another file, but I do have problem because my Promise doesnt return any value.
  When im trying to console.log('website') it returns me undefined immediately (it's like the value is not being fetched at all from API services). I dont know what im doing wrong, I really love to learn about Promises and Async-Await but each time im trying to work with them im getting more confused.</p>
  
  <pre><code>const dns = require('dns')
  const iplocation = require("iplocation").default;
  const emojiFlags = require('emoji-flags');
  
  const getServerIPAddress = async (server) =&gt; {
      return new Promise((resolve, reject) =&gt; {
          dns.lookup(server, (err, address) =&gt; {
              if (err) throw reject(err);
              resolve(address);
          });
      });
  };
  
  
  const getServerLocation = async (server) =&gt; {
      const ip = await getServerIPAddress(server)
  
      iplocation(ip).then((res) =&gt; {
          const country = emojiFlags.countryCode(res.countryCode)
          const result = `Location: ${country.emoji} ${country.name}`
          return result
      })
      .catch(err =&gt; {
          return `Location: Unknown`
      });
  }
  
  (async function() {
      console.log(await getServerLocation('www.google.com'))
  })()
  
  
  module.exports = {
      getServerLocation
  }
  </code></pre>
  
  <p>It is really important for me to get result from this function first, then use its value in another function. I wish you could give me tips on how to do tasks asynchronously.</p>