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