UNPKG

geoip-lite2

Version:

A light weight native JavaScript implementation of GeoIP API from MaxMind. Improved and faster version by Sefinek.

16 lines (13 loc) 285 B
const geoIp2 = require('../lib/main.js'); const ip = '86.63.89.41'; // Function const action = async () => { const data = geoIp2.lookup(ip); console.log(data); }; // Interval setInterval(async () => { await action(); }, 100); // Run (async () => await action())();