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