Returns JSON of requested IP. Supports callback via "callback" GET param
Heroku Example:
heroku config:add ALLOWED_HOSTS=http://mydomain.com/,http://myotherdomain.com
Example:
http://my-copy-of-jsonip.com/
returns...
{"ip":"92.168.148.123"}
Example:
http://my-copy-of-jsonip.com/?callback=my_js_function
returns...
my_js_function({"ip":"92.168.148.123"});
$.getJSON("http://my-copy-of-jsonip.com/?callback=?",
function(data){
alert("Your IP is: " + data.ip);
}
);
To start the app:
bundle exec shotgun
Example request:
http://localhost:9393/
(a local "ALLOWED_HOSTS" ENV is not necessary as it allows all requests in development mode)
In the spirit of free software, everyone is encouraged to help improve this project.
Here are some ways you can contribute:
- by using alpha, beta, and prerelease versions
- by reporting bugs
- by suggesting new features
- by writing or editing documentation
- by writing specifications
- by writing code (no patch is too small: fix typos, add comments, clean up inconsistent whitespace)
- by refactoring code
- by resolving issues
- by reviewing patches