ip-tools

fetch computer ip address with node

Usage no npm install needed!

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

README

ip tool

Description

  • fetch computer ip address with node
  • copy your ip address to clipboard
  • open your server in browser

Install

for node

$  npm install ip-tools

for command line

$  npm install ip -g

Usage

Get your ip

nodejs

var ip = require('ip');
console.log(ip);

command line

$ ip
# this prints: xxx.xx.xxx.xxx

Copy ip to clipboard

$ getip
# prints: copy done
# then you can use `ctrl + v`

Open local server

# default port: 80
$ open

# or
$ open -p 8080

# or
$ open --port 8080