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