I\'m using node.js and I need to get my external IP address, provided by my ISP. Is there a way to achieve this without using a service like http://myexternalip.com/raw ?
npm install --save public-ip from here.
npm install --save public-ip
Then
publicIp.v4().then(ip => { console.log("your public ip address", ip); });
And if you want the local machine ip you can use this.
var ip = require("ip"); var a = ip.address(); console.log("private ip address", a);