EADDRINUSE means that the address you are trying to use port number which listen() tries to bind the server,
You need to check the listening event like this,
var http=require('http');
...
...
});
server.on('listening',function(){
console.log(' server is running');
});
server.listen(80);
Other then, kill the existing process and can start your node.js.
Run the below command to get the process id
# ps aux | grep node
# kill -9 PID
# kill -9 PID
Comments (0)