Update ParseWebSocketServer.js (#5860)

* Update ParseWebSocketServer.js

fix wss:// error by requiring 'ws' module, remove uws as it has been deprecated and removed from npm

* Update ParseWebSocketServer.js

* remove uws
This commit is contained in:
Zeal Murapa
2019-07-29 05:17:09 +02:00
committed by Diamond Lewis
parent 1903f59db5
commit 4f21c36825
3 changed files with 3 additions and 14 deletions

6
package-lock.json generated
View File

@@ -11046,12 +11046,6 @@
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"uws": {
"version": "10.148.1",
"resolved": "https://registry.npmjs.org/uws/-/uws-10.148.1.tgz",
"integrity": "sha1-/Rp5z2EYo4jgob7YoTlwMNLE/Sw=",
"optional": true
},
"v8-compile-cache": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz",

View File

@@ -108,8 +108,7 @@
"parse-server": "./bin/parse-server"
},
"optionalDependencies": {
"bcrypt": "3.0.6",
"uws": "10.148.1"
"bcrypt": "3.0.6"
},
"collective": {
"type": "opencollective",

View File

@@ -1,12 +1,8 @@
import logger from '../logger';
const typeMap = new Map([['disconnect', 'close']]);
const getWS = function() {
try {
return require('uws');
} catch (e) {
return require('ws');
}
const getWS = function(){
return require('ws');
};
export class ParseWebSocketServer {