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