Get your public IP address
npm install --global public-ip-cli
$ public-ip --help
Usage
$ public-ip
Options
--ipv4, -4 Return the IPv4 address (default)
--ipv6, -6 Return the IPv6 address
--https, -h Use HTTPS instead of DNS
--timeout=<ms>, -t Timeout in milliseconds (default: 5000)
Example
$ public-ip
46.5.21.123
$ time public-ip
46.5.21.123
real 0.08s
user 0.05s
sys 0.02s
- public-ip - API for this package