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