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