/net-ip

Internal and Public IP lookup module

Primary LanguageJavaScript

net-ip Build Status

Get your internal and public IP address - very fast!

Install

$ npm install net-ip

Usage

const netip  = require('net-ip')

netip.publicIP().then((ip => {
  console.log(`Your public IP is: ${ip}`)
})

netip.internalIP().then((ip => {
  console.log(`Your internal IP is: ${ip}`)
})

netip.hostName().then((hostname => {
  console.log(`Your hostname is: ${hostname}`)
})

API

publicIP()

privateIP()

hostName()