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