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