86f8b41beab668f82d02e263491e462c15a781dd
[motion2.git] / server / config / express.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 _0x50f7=['passport','cors','moment','./environment','../mysqldb','default','get','env','production','appPath','set','root','client','use','json\x20replacer','toISOString','split','static','/server/views','engine','ejs','renderFile','view\x20engine','html','urlencoded','50mb','initialize','express','body-parser','method-override','cookie-parser','errorhandler','path'];(function(_0x4c75cf,_0x5cc0da){var _0x53c32d=function(_0x3ab2b2){while(--_0x3ab2b2){_0x4c75cf['push'](_0x4c75cf['shift']());}};_0x53c32d(++_0x5cc0da);}(_0x50f7,0x165));var _0x750f=function(_0x1d4152,_0x18e937){_0x1d4152=_0x1d4152-0x0;var _0x40d5b2=_0x50f7[_0x1d4152];return _0x40d5b2;};'use strict';var express=require(_0x750f('0x0'));var favicon=require('serve-favicon');var bodyParser=require(_0x750f('0x1'));var methodOverride=require(_0x750f('0x2'));var cookieParser=require(_0x750f('0x3'));var errorHandler=require(_0x750f('0x4'));var path=require(_0x750f('0x5'));var passport=require(_0x750f('0x6'));var cors=require(_0x750f('0x7'));var moment=require(_0x750f('0x8'));var config=require(_0x750f('0x9'));var db=require(_0x750f('0xa'))['db'];exports[_0x750f('0xb')]=function(_0x423f67){var _0x551806=_0x423f67[_0x750f('0xc')](_0x750f('0xd'));if(_0x551806===_0x750f('0xe')){_0x423f67['set'](_0x750f('0xf'),path['join'](config['root'],'public'));}if(_0x551806==='development'||_0x551806==='test'){_0x423f67[_0x750f('0x10')](_0x750f('0xf'),path['join'](config[_0x750f('0x11')],_0x750f('0x12')));_0x423f67[_0x750f('0x13')](errorHandler());}_0x423f67[_0x750f('0x10')](_0x750f('0x14'),function(_0x37f82b,_0xd3b85){if(this[_0x37f82b]instanceof Date){_0xd3b85=this[_0x37f82b][_0x750f('0x15')]()[_0x750f('0x16')]('.')[0x0]+'Z';}return _0xd3b85;});_0x423f67[_0x750f('0x13')](express[_0x750f('0x17')](_0x423f67['get'](_0x750f('0xf'))));_0x423f67[_0x750f('0x10')]('views',config['root']+_0x750f('0x18'));_0x423f67[_0x750f('0x19')]('html',require(_0x750f('0x1a'))[_0x750f('0x1b')]);_0x423f67[_0x750f('0x10')](_0x750f('0x1c'),_0x750f('0x1d'));_0x423f67[_0x750f('0x13')](bodyParser[_0x750f('0x1e')]({'limit':_0x750f('0x1f'),'extended':!![]}));_0x423f67[_0x750f('0x13')](bodyParser['json']({'limit':_0x750f('0x1f')}));_0x423f67[_0x750f('0x13')](cors());_0x423f67[_0x750f('0x13')](methodOverride());_0x423f67[_0x750f('0x13')](cookieParser());_0x423f67[_0x750f('0x13')](passport[_0x750f('0x20')]());};