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