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