Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A JSON REST api for the db-ip.com geoip database

License

NotificationsYou must be signed in to change notification settings

thomasdarimont/geoip-dbip-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

travis-ci

This project leverages a simple Java webapp that acts as a wrapper around thedb-ip.com geoip databases.The database is available at different levels of details (depends on how much you spend). The basic databases are availablefor free. Compared to other geoip services we considered thedb-ip.com geoip databases very accurateand complete.

Use this project

Drop the war into you favorite servlet container (like Tomcat). The REST interfaceis straightforward, just put the ip to query data for in the path:

$ curl -i http://localhost:8080/dbip-api/80.85.196.23HTTP/1.1 200 OKServer: Apache-Coyote/1.1Content-Type: application/json;charset=UTF-8{ "address":"80.85.196.23",  "country":"DE",  "stateprov":"Hamburg",  "city":"Hamburg",  "latitude":"53.5986",  "longitude":"10.0707",  "isp":"OTTO GmbH & Co. KG",  "organization":"Otto Versand Hamburg GmbH",  "timezone":"Europe/Berlin",  "cityDistrict":"Wandsbek",  "timezoneOffset":"2" }

To configure the location of the db-ip database, pass along the javasystem property-Ddbip-path= or configure the JNDI environmentkeydbip-path.

The response above is a response rendered with the full dp-ip database. Usecurl -i http://localhost:8080/dbip-api/ping as availability monitoring endpoint.

ØMQ bindings

The project offers ØMQ bindings as well. By default, ØMQ binds totcp://*:19000.You can configure the binding by passing the java system property-Dzmq-bindingor configuring the JNDI environment keyzmq-binding.

Building the project

This should install the current version into your local repository

$ mvn clean verify

Releasing the project to maven central

Define new versions

$ export NEXT_VERSION=<version>$ export NEXT_DEVELOPMENT_VERSION=<version>-SNAPSHOT

Then execute the release chain

$ mvn org.codehaus.mojo:versions-maven-plugin:2.0:set -DgenerateBackupPoms=false -DnewVersion=$NEXT_VERSION$ git commit -a -m "pushes to release version $NEXT_VERSION"$ mvn -P release

Then, increment to next development version:

$ git tag -a v$NEXT_VERSION -m "`curl -s http://whatthecommit.com/index.txt`"$ mvn org.codehaus.mojo:versions-maven-plugin:2.0:set -DgenerateBackupPoms=false -DnewVersion=$NEXT_DEVELOPMENT_VERSION$ git commit -a -m "pushes to development version $NEXT_DEVELOPMENT_VERSION"$ git push origin tag v$NEXT_VERSION && git push origin

Contributing

We're looking forward to your comments, issues and pull requests!

License

This project is licensed under theApache License, Version 2.

About

A JSON REST api for the db-ip.com geoip database

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp