NODEJS get netmask node.js - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution
join us

how to get client netmask using node.js ?


 3436

NODEJS


3

// type "node script.js" in command prompt

// code below insert into script.js

var os = require('os');

var interfaces = os.networkInterfaces();
var addresses = [];
for (var k in interfaces) {
for (var k2 in interfaces[k]) {
var address = interfaces[k][k2];
if (address.family === 'IPv4' && !address.internal) {
addresses.push(address.netmask);
}
}
}

console.log(addresses);


By        
The power of the user (%)
60%



The most helpful NODEJS solutions

get user ipget user ipNODEJS

Click to see more ...

  6.3K     1.7K

how to get client netmask using node.js ?how to get client netmask using node.js ?NODEJS

Click to see more ...

  3.4K     557

How to get client machine name and computer name with node.js?How to get client machine name and computer name with node.js?NODEJS

Click to see more ...

  8.5K     437

how to get client local ip address using node.js ?how to get client local ip address using node.js ?NODEJS

Click to see more ...

  1.8K     311

How to get client ip address using node.jsHow to get client ip address using node.jsNODEJS

Click to see more ...

  1.4K     271

How to combine node.js and jquery ?How to combine node.js and jquery ?NODEJS

Click to see more ...

  1.2K     247

how to detect tablet, iPad, iPhone, Android and Blackberry using nodejs ?how to detect tablet, iPad, iPhone, Android and Blackberry using nodejs ?NODEJS

Click to see more ...

  1.5K     161

get client region using node.js ?get client region using node.js ?NODEJS

Click to see more ...

  1.1K     128

get real user ip address using node.js?get real user ip address using node.js?NODEJS

Click to see more ...

  673     124

get server ip address from hostname nodejsget server ip address from hostname nodejsNODEJS

Click to see more ...

  1.7K     122

Welcome aboard!
We are happy you are here and
wish you good net-raft!