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 _0x4a1e=['socket.io-redis','../../config/triggers','default','../../config/socketio','../../config/express','../../routes','once','listening','log','Express\x20server\x20listening\x20on\x20port\x20%d!','exports','lodash','http','express','ioredis','../../config/environment','createServer','timeout','listen','port','socket.io','websocket','redis','localhost','adapter'];(function(_0x470605,_0x48aa37){var _0x10255c=function(_0x4bfdf7){while(--_0x4bfdf7){_0x470605['push'](_0x470605['shift']());}};_0x10255c(++_0x48aa37);}(_0x4a1e,0x6f));var _0xe4a1=function(_0x1d7300,_0x17f109){_0x1d7300=_0x1d7300-0x0;var _0x46ee98=_0x4a1e[_0x1d7300];return _0x46ee98;};'use strict';var _=require(_0xe4a1('0x0'));var http=require(_0xe4a1('0x1'));var express=require(_0xe4a1('0x2'));var sticky=require('sticky-session');var Redis=require(_0xe4a1('0x3'));var config=require(_0xe4a1('0x4'));var app=express();var server=http[_0xe4a1('0x5')](app);server[_0xe4a1('0x6')]=0xdbba0;if(sticky[_0xe4a1('0x7')](server,config[_0xe4a1('0x8')])){var socketio=require(_0xe4a1('0x9'))(server,{'transports':[_0xe4a1('0xa'),'polling']});config[_0xe4a1('0xb')]=_['defaults'](config[_0xe4a1('0xb')],{'host':_0xe4a1('0xc'),'port':0x18eb});socketio[_0xe4a1('0xd')](require(_0xe4a1('0xe'))({'pubClient':new Redis(config[_0xe4a1('0xb')]),'subClient':new Redis(config['redis'])}));require(_0xe4a1('0xf'))[_0xe4a1('0x10')]();require(_0xe4a1('0x11'))[_0xe4a1('0x10')](socketio);require(_0xe4a1('0x12'))[_0xe4a1('0x10')](app);require(_0xe4a1('0x13'))['default'](app);}else{server[_0xe4a1('0x14')](_0xe4a1('0x15'),function(){console[_0xe4a1('0x16')](_0xe4a1('0x17'),config[_0xe4a1('0x8')]);});}exports=module[_0xe4a1('0x18')]=app;