Node.js Express app handle startup errors

This should do the trick:

listener.listen(80).on('error', function(err) { });

What listener.listen actually does is create a HTTP server and call listen on it:

app.listen = function(){
  var server = http.createServer(this);
  return server.listen.apply(server, arguments);
};

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)