geolite2
Maxmind's GeoLite2 Free Databases
Last updated 2 months ago by runk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install geolite2 
SYNC missed versions from official npm registry.

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.

If you don't have access to the environment variables during installation, you can provide license key via package.json:

{
  ...
  "geolite2": {
    // specify the key
    "license-key": "<your license key>",
    // ... or specify the file where key is located:
    "license-file": "maxmind-licence.key"
  }
  ...
}

Beware of security risks of adding keys and secrets to your repository!

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');

Alternatives

geolite2-redist provides redistribution which does not require personal license key. Make sure you understand legal terms and what they mean for your use-case.

License

Creative Commons Attribution-ShareAlike 4.0 International License

Current Tags

  • 3.2.0                                ...           latest (2 months ago)

10 Versions

  • 3.2.0                                ...           2 months ago
  • 3.1.0                                ...           2 months ago
  • 3.0.0                                ...           7 months ago
  • 2.0.2                                ...           9 months ago
  • 2.0.1                                ...           9 months ago
  • 2.0.0                                ...           9 months ago
  • 1.2.1                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.0                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 25
This Month 43
Last Day 2
Last Week 18
Last Month 8
Dependencies (1)
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |