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