list my IP address |
var os=require('os');
var networkInterfaces=os.networkInterfaces();
for (var interface in networkInterfaces) {
networkInterfaces[interface].forEach(function(details){
if (details.family=='IPv4') {
console.log(interface, details.address,
" internal: ", details.internal);
}
});
}
No comments:
Post a Comment