@lemmmy/geoip2-downloader
v1.0.1
Published
Download the latest MaxMind GeoIP2 database
Downloads
9
Readme
GeoIP2 Downloader
This module is a simple downloader for the MaxMind GeoIP2 database. It is extracted from my fork of svtslv's geoip2-cli project, and is intended to be used in conjunction with the maxmind module.
Only downloads the database, does not do any lookups or conversions. Currently only downloads to a file.
This is an ES module.
Installation
yarn add @lemmmy/geoip2-downloader
Examples
import { downloadGeoip2 } from "@lemmmy/geoip2-downloader";
await downloadGeoip2
.download({
licenseKey: process.env.MAXMIND_LICENSE_KEY,
edition: "city", // One of: "city", "country", "asn"
downloadPath: "/geoip-databases/", // Directory to download to, will be created with mkdirp
date: "", // Optional, defaults to latest
})
.then(path => console.log(path));
License
MIT