whatismyip

Node.js package to provide the current public IP address from remote IP lookup servers.

whatismyip

Node.js package to provide the current public IP address from remote IP lookup servers.

var ip = require('whatismyip');
var options = {
  url: 'http://checkip.dyndns.org/',
  truncate: '',
  timeout: 60000,
  matchIndex: 0
};

ip.whatismyip(options, function(err, data){
  if (err === null) {
    console.log(data);
  }
});
$ whatismyip
$ whatismyip -v

or

$ whatismyip --verbose
$ whatismyip -av

or

$ whatismyip --all --verbose
$ whatismyip --help