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