Replace uws with ws package

`uws` was deprecated by its maintainer and starts to cause more and more
problems and issue reports. So it's time to replace it and use a
maintained project instead. Lucky us, `uws` and `ws` can be used in an
identical way, without problems. To provide better performance, we
install the optional packages as well.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
Sheogorath 2018-09-17 23:59:50 +02:00
parent fe977434f9
commit 6b80626dca
No known key found for this signature in database
GPG key ID: 1F05CC3635CDDFFD
2 changed files with 6 additions and 2 deletions

2
app.js
View file

@ -58,7 +58,7 @@ app.use(morgan('combined', {
// socket io
var io = require('socket.io')(server)
io.engine.ws = new (require('uws').Server)({
io.engine.ws = new (require('ws').Server)({
noServer: true,
perMessageDeflate: false
})

View file

@ -125,12 +125,12 @@
"to-markdown": "^3.0.3",
"toobusy-js": "^0.5.1",
"uuid": "^3.1.0",
"uws": "~0.14.1",
"validator": "^10.4.0",
"velocity-animate": "^1.4.0",
"visibilityjs": "^1.2.4",
"viz.js": "^1.7.0",
"winston": "^2.3.0",
"ws": "^6.0.0",
"xss": "^1.0.3"
},
"engines": {
@ -211,5 +211,9 @@
"lib/ot",
"public/vendor"
]
},
"optionalDependencies": {
"bufferutil": "^4.0.0",
"utf-8-validate": "^5.0.1"
}
}