Revert "Use socket.io instead of WebSocket"

In hindsight this may have been a terrible idea.

RIP uptime.

This reverts commit 9195c57445.
This commit is contained in:
ansuz 2018-06-26 15:30:20 +02:00
parent 6dc7e7eff4
commit 02169bfa83
2 changed files with 2 additions and 6 deletions

View File

@ -15,7 +15,6 @@
"pull-stream": "^3.6.1",
"replify": "^1.2.0",
"saferphore": "0.0.1",
"socket.io": "^2.1.1",
"sortify": "^1.0.4",
"stream-to-pull-stream": "^1.7.2",
"tweetnacl": "~0.12.2",

View File

@ -5,7 +5,7 @@ var Express = require('express');
var Http = require('http');
var Https = require('https');
var Fs = require('fs');
var SocketIO = require('socket.io');
var WebSocketServer = require('ws').Server;
var NetfluxSrv = require('./node_modules/chainpad-server/NetfluxWebsocketSrv');
var Package = require('./package.json');
var Path = require("path");
@ -246,10 +246,7 @@ var nt = nThen(function (w) {
console.log("setting up a new websocket server");
wsConfig = { port: websocketPort};
}
var wsSrv = new SocketIO(httpServer, {
path: config.websocketPath || '/cryptpad_websocket'
});
var wsSrv = new WebSocketServer(wsConfig);
Storage.create(config, function (store) {
NetfluxSrv.run(store, wsSrv, config, rpc);
});