i
This commit is contained in:
parent
651076d6bd
commit
342e21a229
1 changed files with 8 additions and 6 deletions
2
index.js
2
index.js
|
@ -68,6 +68,7 @@ io.on('connection', (socket) => {
|
|||
resetVM()
|
||||
|
||||
socket.on('runCode', (transactionId, code) => {
|
||||
(async () => {
|
||||
try {
|
||||
const output = vm.run(code)
|
||||
|
||||
|
@ -75,6 +76,7 @@ io.on('connection', (socket) => {
|
|||
} catch (e) {
|
||||
socket.emit('codeOutput', transactionId, true, e.toString())
|
||||
}
|
||||
})()
|
||||
})
|
||||
|
||||
socket.on('reset', resetVM)
|
||||
|
|
Loading…
Reference in a new issue