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