Ability to use the old Chainpad server in parallel of the netflux server

pull/1/head
Yann Flory 9 years ago
parent 0b3d6e15b8
commit 692fe24b32

@ -177,6 +177,7 @@ var create = module.exports.create = function (socketServer, store) {
}; };
socketServer.on('connection', function(socket) { socketServer.on('connection', function(socket) {
if(socket.upgradeReq.url !== '/cryptpad_websocket_old') { return; }
socket.on('message', function(message) { socket.on('message', function(message) {
try { try {
handleMessage(ctx, socket, message); handleMessage(ctx, socket, message);

@ -84,5 +84,6 @@ var wsSrv = new WebSocketServer(wsConfig);
Storage.create(config, function (store) { Storage.create(config, function (store) {
console.log('DB connected'); console.log('DB connected');
NetfluxSrv.run(store, wsSrv); NetfluxSrv.run(store, wsSrv);
ChainPadSrv.create(wsSrv, store);
WebRTCSrv.run(wsSrv); WebRTCSrv.run(wsSrv);
}); });

Loading…
Cancel
Save