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