1.0.0 • Published 3 months ago

@lemmmy/geoip2-downloader v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

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

1.0.0

3 months ago