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