

Maxmind.validate( '66.6.44.boom!') // returns false

Module supports validation for both IPv4 and IPv6: maxmind.validate( '66.6.44.4') // returns true Check out mmdb-lib that's used under the bonnet - it's environment agnostic and does work in browser. Default: null.Ĭurrent module is designed to work in node.js environment. watchForUpdatesHook: Hook function that is fired on database update.If it is persistent, a node process will be blocked in watching state if the watcher is the only thing still running in the program. watchForUpdatesNonPersistent: Controlls wether the watcher should be persistent or not.


Under the bonnet module uses tiny-lru cache. filepath: Path to the binary mmdb database file.The API returns information based on the recommended route between start and end points, as calculated by the Google Maps API, and consists of rows containing duration and distance values for each pair. const lookup = await maxmind.open( '/path/to/GeoLite2.mmdb') Ĭonst location = lookup.get( '2001:4860:0:1001::3004:ef68') The Distance Matrix API is a service that provides travel distance and time for a matrix of origins and destinations. There are no differences in API between IPv4 and IPv6. Supported response types: - CountryResponse It natively works with binary Maxmind database format and doesn't require any "CSV - from 'maxmind' Ĭonst buffer = fs.readFileSync( './db.mmdb') Ĭonst = lookup.getWithPrefixLength( '66.6.44.4') Module has 100% test coverage with comprehensive test suite. Step 15/15 : CMD supervisord -c /etc/supervisor/conf.d/supervisord.Javascript module for Geo IP lookup using Maxmind binary databases (aka mmdb or geoip2).įastest Maxmind lookup library available - up to 17,000% faster than other libraries. Step 14/15 : RUN chmod 600 /root/.ssh/id_rsa & touch /root/.ssh/known_hosts & chmod 600 /root/.ssh/known_hosts & ssh-keyscan -p 7999 "" > /root/.ssh/known_hosts Step 13/15 : ADD id_rsa /root/.ssh/id_rsa Step 12/15 : COPY nf /etc/supervisor/conf.d/nf
#NODEJS MAXMIND INSTALL#
Step 8/15 : RUN wget -O - | apt-key add - & echo "deb any main" | tee /etc/apt//blackfire.list & apt-get update & apt-get install blackfire-agent & version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION ") & curl -A "Docker" -o /tmp/ -D -L -s $version & tar zxpf /tmp/ -C /tmp & mv /tmp/blackfire-*.so $(php -r "echo ini_get('extension_dir') ")/blackfire.so & printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > /etc/php/7.1/cli/conf.d/blackfire.ini & printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > /etc/php/7.1/fpm/conf.d/blackfire.ini Step 7/15 : RUN mkdir /usr/share/GeoIP & cd /usr/share/GeoIP & rm -f * & wget & wget & wget & gzip -d & gzip -d & gzip -d & mv GeoLiteCity.dat GeoIPCity.dat Step 6/15 : RUN curl -sS | apt-key add & echo "deb stable main" | tee /etc/apt//yarn.list & apt-get update -q & apt-get install -qy yarn Step 5/15 : RUN apt-get update -q & apt-get install -qy software-properties-common language-pack-en-base & export LC_ALL=en_US.UTF-8 & export LANG=en_US.UTF-8 & add-apt-repository ppa:ondrej/php & apt-get update -q & apt-get -yqq install ssh & apt-get install -no-install-recommends -qy ca-certificates cron curl nano vim nginx git graphviz mysql-client php7.1 php7.1-bcmath php7.1-common php7.1-curl php7.1-dom php7.1-fpm php7.1-gd php7.1-iconv php7.1-intl php7.1-json php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-pdo php7.1-phar php7.1-sqlite php7.1-xdebug php7.1-xml php7.1-zip php7.1-soap php-apcu php-geoip supervisor tzdata apt-transport-https wget & apt-get clean & rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* & cp /usr/share/zoneinfo/America/Los_Angeles /etc/localtime & echo "America/Los_Angeles" > /etc/timezone & curl -sS | php -install-dir=/usr/local/bin -filename=composer & curl -L -o /tmp/ $-linux-圆4.tar.gz & tar xfvz /tmp/ -C /usr/local -strip-components=1 & rm -f /tmp/ & npm i -g bower & npm i -g gulp & mkdir /run/php
