Built motion from commit (unavailable).|2.5.31
[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 _0x9e08=['static','/server/views','engine','html','ejs','renderFile','view\x20engine','50mb','json','initialize','serve-favicon','body-parser','method-override','cookie-parser','errorhandler','path','passport','cors','moment','./environment','../mysqldb','default','get','env','production','set','appPath','public','test','root','client','use','toISOString'];(function(_0xc56c46,_0x3fc792){var _0x2055d6=function(_0x110ac3){while(--_0x110ac3){_0xc56c46['push'](_0xc56c46['shift']());}};_0x2055d6(++_0x3fc792);}(_0x9e08,0xd0));var _0x89e0=function(_0x42f0ee,_0x38e0e6){_0x42f0ee=_0x42f0ee-0x0;var _0x1efbc4=_0x9e08[_0x42f0ee];return _0x1efbc4;};'use strict';var express=require('express');var favicon=require(_0x89e0('0x0'));var bodyParser=require(_0x89e0('0x1'));var methodOverride=require(_0x89e0('0x2'));var cookieParser=require(_0x89e0('0x3'));var errorHandler=require(_0x89e0('0x4'));var path=require(_0x89e0('0x5'));var passport=require(_0x89e0('0x6'));var cors=require(_0x89e0('0x7'));var moment=require(_0x89e0('0x8'));var config=require(_0x89e0('0x9'));var db=require(_0x89e0('0xa'))['db'];exports[_0x89e0('0xb')]=function(_0x1a2dcb){var _0x17f88a=_0x1a2dcb[_0x89e0('0xc')](_0x89e0('0xd'));if(_0x17f88a===_0x89e0('0xe')){_0x1a2dcb[_0x89e0('0xf')](_0x89e0('0x10'),path['join'](config['root'],_0x89e0('0x11')));}if(_0x17f88a==='development'||_0x17f88a===_0x89e0('0x12')){_0x1a2dcb[_0x89e0('0xf')](_0x89e0('0x10'),path['join'](config[_0x89e0('0x13')],_0x89e0('0x14')));_0x1a2dcb[_0x89e0('0x15')](errorHandler());}_0x1a2dcb['set']('json\x20replacer',function(_0x21aee7,_0x239968){if(this[_0x21aee7]instanceof Date){_0x239968=this[_0x21aee7][_0x89e0('0x16')]()['split']('.')[0x0]+'Z';}return _0x239968;});_0x1a2dcb[_0x89e0('0x15')](express[_0x89e0('0x17')](_0x1a2dcb[_0x89e0('0xc')](_0x89e0('0x10'))));_0x1a2dcb[_0x89e0('0xf')]('views',config[_0x89e0('0x13')]+_0x89e0('0x18'));_0x1a2dcb[_0x89e0('0x19')](_0x89e0('0x1a'),require(_0x89e0('0x1b'))[_0x89e0('0x1c')]);_0x1a2dcb[_0x89e0('0xf')](_0x89e0('0x1d'),_0x89e0('0x1a'));_0x1a2dcb['use'](bodyParser['urlencoded']({'limit':_0x89e0('0x1e'),'extended':!![]}));_0x1a2dcb[_0x89e0('0x15')](bodyParser[_0x89e0('0x1f')]({'limit':_0x89e0('0x1e')}));_0x1a2dcb[_0x89e0('0x15')](cors());_0x1a2dcb[_0x89e0('0x15')](methodOverride());_0x1a2dcb[_0x89e0('0x15')](cookieParser());_0x1a2dcb[_0x89e0('0x15')](passport[_0x89e0('0x20')]());};