Postman: Connect ECONNREFUSED 127.0.0.1:5005

Solution 1:

You are not passing the port variable to the listen function, you are just logging it

app.listen(() => {
console.log("Node JS server listening on port " + port)
})

This should work

app.listen(port, () => {
  console.log("Node JS server listening on port " + port)
})