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