NodeJS Localhost LAN connection problem
Hello, I have developed a NodeJS server code here below #################################### varĀ http = require('http'); varĀ fs = require('fs'); http.createServer(functionĀ (req, res) { Ā fs.readFile('mywebsite.html',Ā function(err, data) { Ā Ā Ā Ā res.writeHead(200, {'Content-Type':Ā 'text/html'}); Ā Ā Ā res.write(data); Ā Ā Ā Ā res.end(); Ā }); }).listen(8080); #################################### But whenever I run the code, this runs on my computer local host without any problem. But whenever I try connecting my mobile with computer LAN and opening the port 'localhost:8080' it says 'webpage refused to connect' I can not find out what the problem is here , even after being connected to the same LAN in my mobile, port 8080 throws refuse error. Do Wifi and Hotspot matter ? Because my Computer's Wifi is connected to my Mobile Hotspot Any solutions? Thanks for your valuable time