UNPKG
ip-geolocation-live
Version:
latest (1.0.1)
1.0.1
1.0.0
ip-geolocation-live
/
ipgeolocation.js
6 lines
•
213 B
JavaScript
View Raw
1
2
3
4
5
6
var
ip2loc =
require
(
"ip2location-nodejs"
); ip2loc.
IP2Location
_init(
"/IP2LOCATION-LITE-DB3.BIN"
);
exports
.
getIPlocation
=
function
(
ip
) {
let
location = ip2loc.
IP2Location
_get_all(ip);
return
location; }