079cb8f884a29c1c1c727d1fd11a2617934d0530
[motion2.git] / server / services / express / index.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x5e33=['socket.io-redis','default','../../config/express','../../routes','once','listening','log','Express\x20server\x20listening\x20on\x20port\x20%d!','lodash','express','sticky-session','ioredis','../../config/environment','createServer','timeout','listen','port','socket.io','websocket','redis','localhost','adapter'];(function(_0x33c4a1,_0xdfa2de){var _0x5bb879=function(_0x887966){while(--_0x887966){_0x33c4a1['push'](_0x33c4a1['shift']());}};_0x5bb879(++_0xdfa2de);}(_0x5e33,0xb8));var _0x35e3=function(_0x576522,_0x32534e){_0x576522=_0x576522-0x0;var _0x2d9539=_0x5e33[_0x576522];return _0x2d9539;};'use strict';var _=require(_0x35e3('0x0'));var http=require('http');var express=require(_0x35e3('0x1'));var sticky=require(_0x35e3('0x2'));var Redis=require(_0x35e3('0x3'));var config=require(_0x35e3('0x4'));var app=express();var server=http[_0x35e3('0x5')](app);server[_0x35e3('0x6')]=0xdbba0;if(sticky[_0x35e3('0x7')](server,config[_0x35e3('0x8')])){var socketio=require(_0x35e3('0x9'))(server,{'transports':[_0x35e3('0xa'),'polling']});config[_0x35e3('0xb')]=_['defaults'](config[_0x35e3('0xb')],{'host':_0x35e3('0xc'),'port':0x18eb});socketio[_0x35e3('0xd')](require(_0x35e3('0xe'))({'pubClient':new Redis(config['redis']),'subClient':new Redis(config[_0x35e3('0xb')])}));require('../../config/triggers')[_0x35e3('0xf')]();require('../../config/socketio')[_0x35e3('0xf')](socketio);require(_0x35e3('0x10'))['default'](app);require(_0x35e3('0x11'))[_0x35e3('0xf')](app);}else{server[_0x35e3('0x12')](_0x35e3('0x13'),function(){console[_0x35e3('0x14')](_0x35e3('0x15'),config[_0x35e3('0x8')]);});}exports=module['exports']=app;