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