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