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