1d34c9d14320deab126a1dadeed45cc190967db3
[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 _0x5de7=['default','../../config/express','listening','Express\x20server\x20listening\x20on\x20port\x20%d!','port','exports','lodash','http','sticky-session','ioredis','../../config/environment','listen','socket.io','websocket','polling','redis','defaults','adapter','socket.io-redis','../../config/triggers'];(function(_0x3ac298,_0x116e5b){var _0x2c00ac=function(_0x2f70bd){while(--_0x2f70bd){_0x3ac298['push'](_0x3ac298['shift']());}};_0x2c00ac(++_0x116e5b);}(_0x5de7,0xf6));var _0x75de=function(_0x6f514,_0x33f73f){_0x6f514=_0x6f514-0x0;var _0xbfb1a3=_0x5de7[_0x6f514];return _0xbfb1a3;};'use strict';var _=require(_0x75de('0x0'));var http=require(_0x75de('0x1'));var express=require('express');var sticky=require(_0x75de('0x2'));var Redis=require(_0x75de('0x3'));var config=require(_0x75de('0x4'));var app=express();var server=http['createServer'](app);server['timeout']=0xdbba0;if(sticky[_0x75de('0x5')](server,config['port'])){var socketio=require(_0x75de('0x6'))(server,{'transports':[_0x75de('0x7'),_0x75de('0x8')]});config[_0x75de('0x9')]=_[_0x75de('0xa')](config['redis'],{'host':'localhost','port':0x18eb});socketio[_0x75de('0xb')](require(_0x75de('0xc'))({'pubClient':new Redis(config[_0x75de('0x9')]),'subClient':new Redis(config[_0x75de('0x9')])}));require(_0x75de('0xd'))['default']();require('../../config/socketio')[_0x75de('0xe')](socketio);require(_0x75de('0xf'))['default'](app);require('../../routes')['default'](app);}else{server['once'](_0x75de('0x10'),function(){console['log'](_0x75de('0x11'),config[_0x75de('0x12')]);});}exports=module[_0x75de('0x13')]=app;