Created
August 11, 2020 14:04
-
-
Save revenkroz/f2dd8c84bb7f991ab0862e2f226a1ce3 to your computer and use it in GitHub Desktop.
Get local ip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(require('address').ip()); // 10.0.10.134 | |
console.log(require('default-gateway').v4.sync()); // { gateway: '10.0.10.129', interface: null } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment