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