Search code examples
node.jsnitrousio

How to telnet to a Nitrous.io box?


I'm running all the examples from a Node.js tutorial on a nitrous.io box. One of them is a simple echo server:

var net = require('net');

var server = net.createServer(function(socket) {
  socket.on('data', function(data) {
    socket.write(data);
  });
});
server.listen('3000');

The right way to test it would be "telnet [box name] 3000" on my box console, but it does not work as telnet command does exist on nitrous box. I tried from my local terminal using command "telnet boxname.sae1.actionbox.io 3000" but the server responds with http 400 bad request.

Is there a way to telnet a box?


Solution

  • Try netcat; e.g. type nc localhost 3000.