I added a terminal to my web application using node-pty on the server, ng-termianl (xterm.js) on the client and socket.io for the communication. I have it basically working but