I am running a node JS app on my Ubuntu machine and it works, I can visit localhost:8080 on that machine and the app displays. Any other machine on the network however cannot reach it.
CODE:
const portNumber = 8080
let app = express()
app.use(express.static(__dirname + '/public'))
app.get('/', function(req, res) { res.sendFile(__dirname + '/public/stocks.html') })
app.use(bodyParser.json())
app.use(bodyParser.urlencoded({extended: true}))
let httpServer = http.createServer(app)
httpServer.listen(portNumber, function(){ console.log('listening on port:: ' + portNumber) })
etc...
I was using port 4023 at first but switched to 8080. I have also looked into my network diagnostics to specifically allow this app but cannot find the options in my AT&T network config
I installed pm2 and nginx but those aren't necessarily going to help me with this problem until I can get this port unblocked/ all ports unblocked on my LAN.
Thank you in advance!
You often need to bind to
"0.0.0.0"in order for connections outside your machine to work, as in:The default bind is to localhost only, which is of no use for other machines.
Your network firewall is irrelevant here, it doesn't normally block internal traffic. That's up to the individual machines.