Skip to content

Sinatra app wrapping MaxMind's GeoIP City database in pure Ruby

Notifications You must be signed in to change notification settings

ultracaption/jay_geo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JayGeo

Introduction

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.

Requirements

  • Ruby 1.9.3 (Tested and developed on it)
  • Bundler

Setup

  1. Install required gems with Bundler.

    $ bundle install

  2. Download and locate GeoIP City database under project directory>

    ${JAY_GEO_HOME}/db/GeoIPCity.dat

  3. Create ${JAY_GEO_HOME}/config/application.rb for mandatory configuration.

    JayGeo::GeoIp.configure('db/GeoIPCity.dat')

Usage

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]

About

Sinatra app wrapping MaxMind's GeoIP City database in pure Ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages