Get public IP using canihazip.com.
npm install --save canihazip
npm install --global canihazip
var canihazip = require('canihazip');
var ip = canihazip();
canihazip
This will return IP of the current machine, for example: 8.8.8.8
.
MIT © Marko Grešak