Project

jaeheegeo

0.0
No commit activity in last 3 years
No release in over 3 years
Simple web application for geoip
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

JaeheeGeo

This gem contains a simple sinatra-based web application for MaxMind's GeoIP service lookup.

Installation

First, install jaeheego.

$ gem install jaeheegeo

Then run the command below to install geoip data:

$ sudo install_geoip

Usage

To run the application, just run:

$ jaeheegeo start

It will run the sinatra application on thin. So you can provide additional parameters like -p or -d. Default port is 4009.

While the application is running, try these:

$ curl http://localhost:4009/geoip/220.93.126.147
$ curl http://localhost:4009/geoip/klassmate.com

The output is like this:

{"country":"US","county":"CA","city":"San Francisco","lat":37.769699,"lng":-122.393303,"version":"GeoIP City Edition"}

JSONP is also supported for cross domain request. Just pass callback parameter additionally.