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