My current connection node code
var net = require('net');
var client = new net.Socket();
client.connect(3337, '127.0.0.1', function() {
console.log('Connected to server..');
client.write('api|register|{APIKEY}');
});
client.on('data', function(data) {
console.log('Received: ' + data);
client.destroy();
});
client.on('close', function() {
console.log('Connection closed');
});