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