mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
| .. | ||
| bin | ||
| examples | ||
| test | ||
| .jshintignore | ||
| .jshintrc | ||
| .npmignore | ||
| index.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
ips 
Get local, docker and public IP addresses
Install
Package use
npm install ips --save
CLI
npm install ips -g
Examples
Command line
ips
Basic
var ips = require('ips')
var result = ips()
console.log(result) // ex: { local: '192.168.10.3', docker: '192.168.10.103' }
With External IP
var ips = require('ips')
ips(function(err, data) {
console.log(data) // ex: { local: '192.168.10.3', public: '70.22.12.182' }
})