title: How to set dns server in node.js resolve query?
body: <p>I'm trying to set Google DNS server <code>8.8.8.8</code> in Node.js resolve query. </p>
  
  <p>What is the correct way to do so? In command line usually we can do the following:</p>
  
  <pre><code>$ nslookup stackoverflow.com 8.8.8.8
  
  Server:     8.8.8.8
  Address:    8.8.8.8#53
  
  Non-authoritative answer:
  Name:   stackoverflow.com
  Address: 151.101.1.69
  Address: 151.101.65.69
  Address: 151.101.129.69
  Address: 151.101.193.69
  </code></pre>
  
  <p>But its not quite clear how to make same approach in Node.js</p>
  
  <pre><code>require('dns').resolve('stackoverflow.com', function (err, addresses) {
    console.log(err, addresses);
  });
  
  // =&gt; null [ '151.101.1.69', '151.101.65.69', '151.101.129.69', '151.101.193.69' ]
  </code></pre>
  
  <hr>