get-my-ip

Return the best-guess public IP of the local machine.

Usage no npm install needed!

<script type="module">
  import getMyIp from 'https://cdn.skypack.dev/get-my-ip';
</script>

README

get-my-ip

Returns the best-guess public IP address (IPv4) of the local machine.

Install

npm install get-my-ip

Usage

var getMyIP = require('get-my-ip')
console.log('My IP is:', getMyIP())