ptyProcess.on('data', function (data) { ws.send(data); console.log(data); });