Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tlatsas/ipz
Simple Node.js app that shows your IP/hostname and can speak json
https://github.com/tlatsas/ipz
Last synced: 25 days ago
JSON representation
Simple Node.js app that shows your IP/hostname and can speak json
- Host: GitHub
- URL: https://github.com/tlatsas/ipz
- Owner: tlatsas
- License: mit
- Created: 2012-05-04T12:45:24.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-06-04T05:52:40.000Z (over 11 years ago)
- Last Synced: 2024-12-05T20:16:48.269Z (about 2 months ago)
- Language: JavaScript
- Homepage: http://ipz.herokuapp.com/
- Size: 137 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ipz
---
A very simple service that shows your public ip address.
You can test it on [heroku](http://ipz.herokuapp.com/).
Ipz can also return your ip and hostname (if applicable) in JSON format.Install
-------
Ipz can be installed using npm:$ npm install ipz
Response
--------
Using CURL:$ curl -X GET -H "Accept: application/json" http://ipz.herokuapp.com/
will respond with:
{"ip": "your ip here"}
or:
{
"ip": "79.167.55.15",
"hostname": "foo"
}Nginx
-----
Sample configuration using nginx. It assumes that the application listens on port 8080.server {
listen 80;
server_name ip.example.com;location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
}
}Run using Systemd
-----------------
See `ipz.service` in the systemd folder.License
-------
See `LICENSE`.Authors
-------
Tasos Latsas