1

Given the following simple TCP socket server running on AppFog that echoes back whatever the client sends.

var net = require('net');

var server = net.createServer(function (socket) {
  socket.write('Echo server\r\n');
  socket.pipe(socket);
});

var port = process.env.VCAP_APP_PORT || 80;
server.listen(port);
console.log('Server running at ' + port);

I can't seem to connect to the server at all. It works fine on my local development machine.

Does AppFog support what I am trying to do at all? I'm relatively new to Node.js so I can't say for sure the code is correct.

ains
  • 1,436
  • 4
  • 18
  • 33
  • possible duplicate of [Node.js TCP Socket Server on the Cloud \[Heroku/AppFog\]](http://stackoverflow.com/questions/13458943/node-js-tcp-socket-server-on-the-cloud-heroku-appfog) – Preview Dec 15 '14 at 10:47

1 Answers1

1

The short answer is no. The long answer is in this other StakOverflow question: Node.js TCP Socket Server on the Cloud [Heroku/AppFog]

Community
  • 1
  • 1
indexzero
  • 1,024
  • 9
  • 5