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