Skip to content
Maxmind's GeoLite2 Free Databases
JavaScript Shell
Branch: master
Clone or download
Latest commit abafe7a Jan 1, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dbs Tweak postinstall script Nov 27, 2019
scripts Support end-user license agreement Jan 1, 2020
test add ASN db, update databases Feb 8, 2018
.gitattributes Setup Git LFS Aug 24, 2016
.gitignore Ignore contents of dbs dir Nov 27, 2019
.travis.yml Tweak postinstall script Nov 27, 2019
LICENSE Update LICENSE Dec 23, 2018
README.md Update readme Jan 1, 2020
index.js Format Nov 29, 2019
package-lock.json 3.0.0 Jan 1, 2020
package.json 3.0.0 Jan 1, 2020

README.md

node-geolite2 Build Status

Maxmind's GeoLite2 Free Databases download helper.

Usage

IMPORTANT You must setup MAXMIND_LICENSE_KEY environment variable be able to download databases. To do so, go to the https://www.maxmind.com/en/geolite2/signup, create a free account and generate new license key.

var geolite2 = require('geolite2');
var maxmind = require('maxmind');

var lookup = maxmind.openSync(geolite2.paths.city); // or geolite2.paths.country or geolite2.paths.asn
var city = lookup.get('66.6.44.4');

License

Creative Commons Attribution-ShareAlike 4.0 International License

You can’t perform that action at this time.