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