Net server in startup gives connection refused


#1

I published my application in Amazon AWS with this code in the application startup :

var net = Npm.require('net');
Fiber = Npm.require('fibers');
var server = net.createServer(function(c) {
  console.log('Client Conected');
  c.on('data',function(data){
    console.log("Recived: "+ data.toString());
    c.write("LOAD");
  });
  c.on('end', function() {
    console.log('Client Disconected');
  });
  c.pipe(c);
});
server.listen(8124, function() {
  console.log('Gateway Started');
});

When I try to send data over telnet I get connection refused and if I run code in pure nodejs server can connect , anyone have any idea what can be ?

I’m using the mupx to deploy in aws

Thank you!


#2

someone has an idea ?