1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0x404c=['listen','port','socket.io','websocket','polling','defaults','localhost','socket.io-redis','redis','../../config/triggers','default','../../config/express','../../routes','once','listening','exports','lodash','http','express','ioredis','../../config/environment','createServer','timeout'];(function(_0x1c81ff,_0x4090d0){var _0x20f592=function(_0x27389b){while(--_0x27389b){_0x1c81ff['push'](_0x1c81ff['shift']());}};_0x20f592(++_0x4090d0);}(_0x404c,0x1c5));var _0xc404=function(_0x2406d7,_0x2b02c2){_0x2406d7=_0x2406d7-0x0;var _0x1cdb50=_0x404c[_0x2406d7];return _0x1cdb50;};'use strict';var _=require(_0xc404('0x0'));var http=require(_0xc404('0x1'));var express=require(_0xc404('0x2'));var sticky=require('sticky-session');var Redis=require(_0xc404('0x3'));var config=require(_0xc404('0x4'));var app=express();var server=http[_0xc404('0x5')](app);server[_0xc404('0x6')]=0xdbba0;if(sticky[_0xc404('0x7')](server,config[_0xc404('0x8')])){var socketio=require(_0xc404('0x9'))(server,{'transports':[_0xc404('0xa'),_0xc404('0xb')]});config['redis']=_[_0xc404('0xc')](config['redis'],{'host':_0xc404('0xd'),'port':0x18eb});socketio['adapter'](require(_0xc404('0xe'))({'pubClient':new Redis(config[_0xc404('0xf')]),'subClient':new Redis(config['redis'])}));require(_0xc404('0x10'))[_0xc404('0x11')]();require('../../config/socketio')[_0xc404('0x11')](socketio);require(_0xc404('0x12'))[_0xc404('0x11')](app);require(_0xc404('0x13'))[_0xc404('0x11')](app);}else{server[_0xc404('0x14')](_0xc404('0x15'),function(){console['log']('Express\x20server\x20listening\x20on\x20port\x20%d!',config[_0xc404('0x8')]);});}exports=module[_0xc404('0x16')]=app;