updates websocket library to version 8
This commit is contained in:
parent
6529d2bbe1
commit
16fafc8add
|
|
@ -5,7 +5,7 @@
|
|||
Creates the WebServer which serves the static assets and communicates with the clients
|
||||
via WebSockets
|
||||
*/
|
||||
import WebSocket from 'ws'
|
||||
import { WebSocket, WebSocketServer } from 'ws'
|
||||
import finalhandler from 'finalhandler'
|
||||
import http from 'http'
|
||||
import serveStatic from 'serve-static'
|
||||
|
|
@ -26,7 +26,7 @@ function createWebServer () {
|
|||
log.info(`webserver running on port ${port}`)
|
||||
})
|
||||
|
||||
const wss = new WebSocket.Server({ server })
|
||||
const wss = new WebSocketServer({ server })
|
||||
|
||||
wss.on('connection', function connection (ws) {
|
||||
log.debug('websocket client connected')
|
||||
|
|
|
|||
|
|
@ -5077,6 +5077,12 @@
|
|||
"requires": {
|
||||
"ansi-regex": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"ws": {
|
||||
"version": "7.5.5",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz",
|
||||
"integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -5642,9 +5648,9 @@
|
|||
}
|
||||
},
|
||||
"ws": {
|
||||
"version": "7.5.5",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz",
|
||||
"integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w=="
|
||||
"version": "8.2.3",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz",
|
||||
"integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA=="
|
||||
},
|
||||
"xml2js": {
|
||||
"version": "0.4.23",
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
"nosleep.js": "^0.12.0",
|
||||
"onoff": "^6.0.3",
|
||||
"serve-static": "^1.14.1",
|
||||
"ws": "^7.5.5",
|
||||
"ws": "^8.2.3",
|
||||
"xml2js": "^0.4.23"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
Loading…
Reference in New Issue