Hi All and sorry for my english.
i have a function that return a dns name off an IP on console.log but my 
goal is to have it as variable (to push it on a page later).
My function :

function toto(ip){
    const dns = require('dns');
 
    dns.reverse(ip, function(err, domains) {
      dns.setServers(['10.1.5.4', '10.15.5.2']);
      if (domains) {
        console.log(JSON.stringify(domains)); 
      } else {
        callback(err.code);
      }
 
 
    });
 };
 
toto('10.16.4.16');

On console i have :  ["sertest"]


----

PS : can i have this  var tata=toto('10.16.4.16'); ?


-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/10aaf37f-b43b-446a-b8fd-adce5f5c426a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to