How can i make a node.js server to listen to my ip on my lan instead of localhost
问题 I have a website built on top of expressjs and node.js which is running fine on my localhost. How can i make it to run on my ip(192.168.69.100) instead of localhost so that other users on my LAN can access it.? Thanks in advance. :) A snippet of my code app.listen(port,function (err) { if(err) { console.log(err); } console.log('Running on ' + port); }); 回答1: 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