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