Question linked to Get local IP address in node.js
May I ask for a little help?
In this example of usage,
getNetworkIP(function (error, ip) {
console.log(ip);
if (error) {
console.log('error:', error);
}}, false);
how is it possible to get the ip value outside the callback? For instance to use it for a connection or whatever. I tried to return it, export it, pass it, but non of these methods are working. Please help me, I'm going mental!!
Thanks!
P.S.: this code has been really useful to me, to understand a little bit more. I'm really newbie. Thanks a million for sharing it.