0.1.1 • Published 11 years ago

redis-geo v0.1.1

Weekly downloads
4
License
-
Repository
github
Last release
11 years ago

redis-geo

GeoIp backed by redis. Port of examples provided by Redis in Action. Buy the book!

Module Usage

var redis = require('redis').createClient();
var geoip = require('redis-geo')(redis);

geoip('71.75.248.222', function (err, info) {
  if (err) throw err;
  console.log(info);
});

Example output:

{
  country: 'US',
  state: 'NC',
  city: 'Waxhaw',
  zip: '28173',
  lat: '34.9273',
  lng: '-80.7278',
  metro: '517',
  areacode: '704'
}

Importing Data

First import the block via the csv dump.

$ redis-geo import-blocks /to/to/blocks.csv

Next, import the locations.

$ redis-geo import-locations path/to/locations.csv

License

MIT

0.1.1

11 years ago

0.1.0

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago