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