Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/basgrani-org/bas-meteor-ip-geo
IP GeoLocation for Meteor
https://github.com/basgrani-org/bas-meteor-ip-geo
Last synced: about 1 month ago
JSON representation
IP GeoLocation for Meteor
- Host: GitHub
- URL: https://github.com/basgrani-org/bas-meteor-ip-geo
- Owner: Basgrani-Org
- License: mit
- Created: 2016-08-10T20:12:46.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-30T21:12:57.000Z (about 6 years ago)
- Last Synced: 2024-10-03T09:28:00.424Z (about 1 month ago)
- Language: JavaScript
- Size: 17.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Geocode IP addresses for Meteor (v1.4.3+)
[![Donate to this project using Paypal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9EARMSN5WMDDY)
## Install
```
meteor npm install bas-meteor-ip-geo
```## Use
(Server)
```js
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)
```js
// 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:
```js
IpGeo.defaultDatabaseUrl = 'https://sample.com/GeoLite2-City.mmdb.gz';
```Or Meteor.settings
```json
{
"IpGeo" : {
"databaseUrl" : "https://sample.com/GeoLite2-City.mmdb.gz"
}
}
```## Backers
### Maintainers
These amazing people are maintaining this project:
- [Basgrani](http://basgrani.com) - [view contributions](https://github.com/Basgrani-Org/bas-meteor-ip-geo/commits?author=Basgrani)
### Sponsors
No sponsors yet! Will you be the first?
[![Donate to this project using Paypal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9EARMSN5WMDDY)
### Contributors
These amazing people have contributed code to this project:
- [Basgrani](http://basgrani.com) - [view contributions](https://github.com/Basgrani-Org/bas-meteor-ip-geo/commits?author=Basgrani)
### Contribute
If you wish you can contribute to the development of this project:
- Contribute with your code
- [Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9EARMSN5WMDDY)
## License
- View the [LICENSE](https://github.com/Basgrani-Org/bas-meteor-ip-geo/blob/master/LICENSE.md)
## Contact