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