tried several container id

This commit is contained in:
Annie Huang authored and wancat committed 2023-08-17 19:43:55 +08:00
1 parent 9b4335a628
commit 0195305d0e
2 files changed
+10 -1

No files matched your search

+1
View File
@@ -15,6 +15,7 @@
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@fortawesome/vue-fontawesome": "^3.0.3",
"axios": "^1.4.0",
"socket.io-client": "^4.7.1",
"vue": "^3.3.4",
"xterm": "^5.2.1",
"xterm-addon-attach": "^0.8.0",
+9 -1
View File
@@ -51,7 +51,15 @@ export default {
lineHeight: 20,
},
})
const socket = new WebSocket('http://localhost:3000')
const wsHost = 'odyssey.wancat.cc'
// const wsHost = 'localhost:3000'
// const container = 'quest-helloworld-defaultUser-1690375754669'
// const container = '1690375754669'
const container = '64c1164a5b34af580963da6b'
// const container = '423ba17d5863'
// const container = 'dcb865c0e5a5 '
const ws = `wss://${wsHost}/containers/${container}/attach/ws?stream=true`
const socket = new WebSocket(ws)
const attachAddon = new AttachAddon(socket)
// 创建terminal实例
term.loadAddon(attachAddon)