Update web-terminal.js

This commit is contained in:
Bozhidar 2024-04-22 19:12:48 +03:00
parent ccbc10ac2f
commit 86c0228a78

View file

@ -45,7 +45,7 @@ if (terminalElement !== null) {
fitAddon.fit();
const socket = new WebSocket(`ws://49.13.166.115:3311`);
const socket = new WebSocket(`ws://${window.location.host}/_shell/`);
socket.addEventListener('open', (_) => {
terminal.onData((data) => socket.send(data));
socket.addEventListener('message', (evt) => terminal.write(evt.data));