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