refactor: move client to sperate packages, rename cli to container

This commit is contained in:
wancat committed 2023-08-21 20:40:05 +08:00
1 parent 41a12c9aa8
commit 6ace18475b
15 files changed
+51 -28

No files matched your search

+4 -2
View File
@@ -50,10 +50,12 @@ export default (server) => {
const stream = await attachContainer(container, { token })
stream.on('data', (chunk) => {
socket.send(chunk.toString())
socket.emit('terminal', chunk.toString())
})
socket.on('message', function incoming(message) {
socket.on('message', console.log)
socket.on('terminal', function incoming(message) {
stream.write(message)
})