Get GeoLite2 data over HTTP
- Node.js v20.x (LTS)
- MaxMind account for API Keys to download GeoLite2 databases
- IMPORTANT NOTE: While free, redistribution of these database files is not allowed by the MaxMind GeoLite2 license. You must download the database files yourself and abide by the license terms
- Run
npm install
- Run the update process described below
- Run
npm start
cd ./node_modules/geoip-lite/;
rm -r ./data/;
npm run-script updatedb license_key="YOUR_LICENSE_KEY_HERE";
You may wish to backup the downloaded and processed data in ./node_modules/geoip-lite/data
directory
Only IPv4 is supported at this time.
If you want to limit access, host internally and ensure your firewall is correctly configured.
curl -v http://localhost:8080/v0/geoip?ipv4=[IPv4 STRING HERE];