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