My Local IP Is
My Local IP Is is a package to find your local IP adress, for access over the LAN.
It can be used as a CLI or as a Node Module. here are some usage examples:
In the terminal you can just run
and you will get a result like
that you can then use to access yourr device over the LAN.
As a node module it's pretty simple. First, you must import it.
const myLocalIpIs =
Then, you can call it at will. it will return a array of objects, with the properties
name (the name of the IP interface) and
ip (the IP adress). for example,
const myLocalIpIs =console;
returns something like this in the console:
In most cases, you will simply want the first IP adress. this can be acheved with the following code:
const myLocalIpIs =let ip = 0"ip"console
that will then return a IP like
made with ❤️ from DerpMarine