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