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