fetch("https://ipinfo.io/json") .then(response => response.json()) .then(data => { console.log(data); }); 위 코드를 추가하면 끝 또 다른 방법은 geoip-lite 라는 라이브러리를 사용하면 된다. const geo = require("geoip-lite"); const ip = "8.8.8.8"; const geoData = geo.lookup(ip); console.log(geoData);