JayGeo is a sinatra app wrapping MaxMind's GeoIP City database. Based on geoip gem, it provides pure Ruby implementation of reverse geocoding provider available for self-hosting.
- Ruby 1.9.3 (Tested and developed on it)
- Bundler
-
Install required gems with Bundler.
$ bundle install
-
Download and locate GeoIP City database under project directory>
${JAY_GEO_HOME}/db/GeoIPCity.dat
-
Create
${JAY_GEO_HOME}/config/application.rb
for mandatory configuration.JayGeo::GeoIp.configure('db/GeoIPCity.dat')
Execute unicorn
to run the server.
bundle exec unicorn
After the server boots up, you can query via GET /find
API.
GET /find?q=[query]