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