Skip to content

Node/TypeScript module for downloading the MaxMind GeoIP2 database.

License

Notifications You must be signed in to change notification settings

Lemmmy/geoip2-downloader

Repository files navigation

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

About

Node/TypeScript module for downloading the MaxMind GeoIP2 database.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published