2b55cfe884c6a2b9702b33981fc80c961af21f60
[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 _0xadf5=['listen','port','socket.io','websocket','polling','redis','defaults','localhost','socket.io-redis','../../config/triggers','default','../../config/socketio','../../config/express','once','listening','log','Express\x20server\x20listening\x20on\x20port\x20%d!','exports','lodash','http','express','sticky-session','ioredis','createServer','timeout'];(function(_0x2f5fe6,_0x12a9c9){var _0x43b124=function(_0x447a84){while(--_0x447a84){_0x2f5fe6['push'](_0x2f5fe6['shift']());}};_0x43b124(++_0x12a9c9);}(_0xadf5,0x157));var _0x5adf=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0xadf5[_0x3b380d];return _0x54502b;};'use strict';var _=require(_0x5adf('0x0'));var http=require(_0x5adf('0x1'));var express=require(_0x5adf('0x2'));var sticky=require(_0x5adf('0x3'));var Redis=require(_0x5adf('0x4'));var config=require('../../config/environment');var app=express();var server=http[_0x5adf('0x5')](app);server[_0x5adf('0x6')]=0xdbba0;if(sticky[_0x5adf('0x7')](server,config[_0x5adf('0x8')])){var socketio=require(_0x5adf('0x9'))(server,{'transports':[_0x5adf('0xa'),_0x5adf('0xb')]});config[_0x5adf('0xc')]=_[_0x5adf('0xd')](config[_0x5adf('0xc')],{'host':_0x5adf('0xe'),'port':0x18eb});socketio['adapter'](require(_0x5adf('0xf'))({'pubClient':new Redis(config[_0x5adf('0xc')]),'subClient':new Redis(config['redis'])}));require(_0x5adf('0x10'))[_0x5adf('0x11')]();require(_0x5adf('0x12'))[_0x5adf('0x11')](socketio);require(_0x5adf('0x13'))[_0x5adf('0x11')](app);require('../../routes')[_0x5adf('0x11')](app);}else{server[_0x5adf('0x14')](_0x5adf('0x15'),function(){console[_0x5adf('0x16')](_0x5adf('0x17'),config[_0x5adf('0x8')]);});}exports=module[_0x5adf('0x18')]=app;