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