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