Realize web terminal with pty.js