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