How can i make a node.js server to listen to my ip on my lan instead of localhost How can i make a node.js server to listen to my ip on my lan instead of localhost express express

How can i make a node.js server to listen to my ip on my lan instead of localhost


By default node will run on every IP address exposed by the host on which it runs. You don't need to do anything special. You already knew the server runs on a particular port. You can prove this, by using that IP address on a browser on that machine:

http://192.168.69.100:port

If that didn't work, you might have your IP address wrong.


Might be good to give the device running node a fixed-ip if you're using DHCP; at some point your IP-address might change and the server is not accessible anymore. Alternatively you can use your hostname after some additional work.