就是用nodejs搭建的服务器,连上网后服务器的ip怎么能获得,跟连局域网是不一样的,,,,有木有大神指教下,,小弟初学
你是要获取网卡的地址还是说服务器外网的地址,外网地址与物理网卡地址可能不一样
ubuntu话你可以开个子进程执行ifconfig,读取stdout作解析
window服务器不是很了解
#1123<br/><br/><a class="form" href="https://github.com/shinygang/Vue-cnodejs">I‘m webapp-cnodejs-vue</a>
@gxr1020 、】【】<br/><br/><a class="form" href="https://github.com/shinygang/Vue-cnodejs">I‘m webapp-cnodejs-vue</a>
@gxr1020 sdfaaaaaaaaaaa<br/><br/><a class="form" href="https://github.com/shinygang/Vue-cnodejs">I‘m webapp-cnodejs-vue</a>
@gxr1020 aa<br/><br/><a class="form" href="https://github.com/shinygang/Vue-cnodejs">I‘m webapp-cnodejs-vue</a>
@gxr1020 aa<br/><br/><a class="form" href="https://github.com/shinygang/Vue-cnodejs">I‘m webapp-cnodejs-vue</a>
1111<br/><br/><a class="form" href="https://github.com/shinygang/Vue-cnodejs">I‘m webapp-cnodejs-vue</a>
1111<br/><br/><a class="form" href="https://github.com/shinygang/Vue-cnodejs">I‘m webapp-cnodejs-vue</a>