hxnodejs-maxmind

Externs for the maxmind NPM module


Keywords
city, country, geoip, maxmind, nativejs, nodejs
License
MIT
Install
haxelib install hxnodejs-maxmind 2.11.1

Documentation

Haxe/hxnodejs externs for the maxmind npm library

Tested using maxmind version 2.11.0

Example

This example requires the free GeoLite2 database files.

package main;

import js.npm.Maxmind;
import js.npm.maxmind.Reader;

class Main {
  static public function main() {
    var countryReader:Reader<CountryResponse> = Maxmind.openSync('data/20181120/GeoLite2-Country.mmdb');
    trace(countryReader.get("8.8.8.8"));
  }
}