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