NodeJS:获取本地接口的 IP 地址
问题:
你想使用 NodeJS 以独立于操作系统的方式获取本地计算机网络接口的 IPv4 和/或 IPv6 地址。
解决方案
你可以使用标准 NodeJS 库函数 os.networkInterfaces()
代码(Node.JS 和 CoffeeScript 变体)现在托管在 StackOverflow上
Check out similar posts by category:
Allgemein
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow