Remove redundant ws dependency

`socket.io` already depends on `ws` and uses it by default.
The separate dependency to and initialization of `ws` sees to be
a relic of the past usage of `uws`, but is redundant now.

As documented in https://socket.io/docs/v2/server-initialization/#Notable-options,
`perMessageDeflate` is now `false` by default.

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-08-14 12:52:12 +02:00
parent 540c86009b
commit 9831a55287
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
3 changed files with 3 additions and 20 deletions

4
app.js
View file

@ -74,10 +74,6 @@ metrics.setupCustomPrometheusMetrics()
// socket io
const io = require('socket.io')(server, { cookie: false })
io.engine.ws = new (require('ws').Server)({
noServer: true,
perMessageDeflate: false
})
// others
const realtime = require('./lib/realtime.js')