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