Built motion from commit d13fb11b.|2.6.34
[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 _0x3eb2=['default','../../config/socketio','../../config/express','../../routes','once','listening','log','Express\x20server\x20listening\x20on\x20port\x20%d!','exports','lodash','http','express','../../config/environment','createServer','timeout','listen','port','redis','defaults','localhost','adapter','socket.io-redis','../../config/triggers'];(function(_0x87239,_0x38c793){var _0x53af1e=function(_0x11eb5f){while(--_0x11eb5f){_0x87239['push'](_0x87239['shift']());}};_0x53af1e(++_0x38c793);}(_0x3eb2,0xaa));var _0x23eb=function(_0x7b17fe,_0x1233ff){_0x7b17fe=_0x7b17fe-0x0;var _0x5215be=_0x3eb2[_0x7b17fe];return _0x5215be;};'use strict';var _=require(_0x23eb('0x0'));var http=require(_0x23eb('0x1'));var express=require(_0x23eb('0x2'));var sticky=require('sticky-session');var Redis=require('ioredis');var config=require(_0x23eb('0x3'));var app=express();var server=http[_0x23eb('0x4')](app);server[_0x23eb('0x5')]=0xdbba0;if(sticky[_0x23eb('0x6')](server,config[_0x23eb('0x7')])){var socketio=require('socket.io')(server,{'transports':['websocket','polling']});config[_0x23eb('0x8')]=_[_0x23eb('0x9')](config['redis'],{'host':_0x23eb('0xa'),'port':0x18eb});socketio[_0x23eb('0xb')](require(_0x23eb('0xc'))({'pubClient':new Redis(config[_0x23eb('0x8')]),'subClient':new Redis(config[_0x23eb('0x8')])}));require(_0x23eb('0xd'))[_0x23eb('0xe')]();require(_0x23eb('0xf'))[_0x23eb('0xe')](socketio);require(_0x23eb('0x10'))[_0x23eb('0xe')](app);require(_0x23eb('0x11'))['default'](app);}else{server[_0x23eb('0x12')](_0x23eb('0x13'),function(){console[_0x23eb('0x14')](_0x23eb('0x15'),config[_0x23eb('0x7')]);});}exports=module[_0x23eb('0x16')]=app;