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