Answers for "check ip address in node js"

4

get ip of user in node js

//In your request object there is a property called connection, 
//which is a net.Socket object. The net.Socket object has a property 
//remoteAddress, therefore you should be able to get the IP with this call:

request.connection.remoteAddress
Posted by: Guest on August-04-2020
0

get ip address js

function getIPFromAmazon() {
  fetch("https://checkip.amazonaws.com/").then(res => res.text())
    .then(data => console.log(data))
}

getIPFromAmazon()
Posted by: Guest on January-09-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language