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