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