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