Socket
Book a DemoInstallSign in
Socket

bas-meteor-ip-geo

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bas-meteor-ip-geo

Geocode IP addresses using MaxMind IP database.

1.1.1
latest
Source
npmnpm
Version published
Weekly downloads
12
Maintainers
1
Weekly downloads
 
Created
Source

Geocode IP addresses for Meteor (v1.4.3+)

Donate to this project using Paypal

Install

meteor npm install bas-meteor-ip-geo

Use

(Server)

import { IpGeo } from 'bas-meteor-ip-geo';

// you can do it synchronously 
let geoData = IpGeo.geocode('74.125.224.72');

// or asynchronously
IpGeo.geocode('74.125.224.72', false, function(error, result){
    if(!error){
        //...
    }
});

(Client)

// Get Geocode - change sample ip for "null" for get de current client ip
Meteor.call("BasMTR:IpGeo:geocode", '74.125.224.72', false, function(err, data){
    if(err) {
        console.log(err, err.stack); // an error occurred
    } else {
        console.log(data);
    }
});

Configure

Custom download url:

IpGeo.defaultDatabaseUrl = 'https://sample.com/GeoLite2-City.mmdb.gz';

Or Meteor.settings

{
    "IpGeo" : {
        "databaseUrl" : "https://sample.com/GeoLite2-City.mmdb.gz"
    }
}

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

Donate to this project using Paypal

Contributors

These amazing people have contributed code to this project:

Contribute

If you wish you can contribute to the development of this project:

  • Contribute with your code

  • Donate

License

Contact

Keywords

meteor

FAQs

Package last updated on 30 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.