[英]Hosting NodeJS on a Local Network
Currently, I am trying to host my app on my company local network. 目前,我正在尝试在我的公司本地网络上托管我的应用。 I realised that when I connect to my company Wifi, different devices connected to the same WiFi network, have different IPv4 Address.
我意识到,当我连接到公司的Wifi网络时,连接到同一WiFi网络的不同设备将具有不同的IPv4地址。 I want to be able to host this app such that all the devices connected to the same Wifi network be able to access the app.
我希望能够托管此应用程序,以便连接到同一Wifi网络的所有设备都可以访问该应用程序。 May I know how should I proceed with this issue?
我可以知道该怎么办吗?
I was only able to listen from the IP where my server is running. 我只能从运行服务器的IP上侦听。
Your help will be very much appreciated. 非常感谢您的帮助。 Thank you
谢谢
You should install http-server on npm. 您应该在npm上安装http-server。
Run http-server <./path/to/thing>
运行
http-server <./path/to/thing>
You can read more about it on: https://www.npmjs.com/package/http-server 您可以在以下网址了解更多信息: https : //www.npmjs.com/package/http-server
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.