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