Built motion from commit (unavailable).|2.3.97
[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 _0xe706=['toISOString','engine','html','view\x20engine','urlencoded','50mb','json','initialize','express','serve-favicon','body-parser','cookie-parser','errorhandler','path','passport','cors','moment','./environment','../mysqldb','default','get','env','production','use','join','root','public','favicon.ico','set','appPath','client'];(function(_0x5a8e6b,_0x77a0be){var _0x1669a9=function(_0x56d574){while(--_0x56d574){_0x5a8e6b['push'](_0x5a8e6b['shift']());}};_0x1669a9(++_0x77a0be);}(_0xe706,0xa3));var _0x6e70=function(_0x3878e9,_0x14fcf2){_0x3878e9=_0x3878e9-0x0;var _0x2ad526=_0xe706[_0x3878e9];return _0x2ad526;};'use strict';var express=require(_0x6e70('0x0'));var favicon=require(_0x6e70('0x1'));var bodyParser=require(_0x6e70('0x2'));var methodOverride=require('method-override');var cookieParser=require(_0x6e70('0x3'));var errorHandler=require(_0x6e70('0x4'));var path=require(_0x6e70('0x5'));var passport=require(_0x6e70('0x6'));var cors=require(_0x6e70('0x7'));var moment=require(_0x6e70('0x8'));var config=require(_0x6e70('0x9'));var db=require(_0x6e70('0xa'))['db'];exports[_0x6e70('0xb')]=function(_0x4381d1){var _0x36357b=_0x4381d1[_0x6e70('0xc')](_0x6e70('0xd'));if(_0x36357b===_0x6e70('0xe')){_0x4381d1[_0x6e70('0xf')](favicon(path[_0x6e70('0x10')](config[_0x6e70('0x11')],_0x6e70('0x12'),_0x6e70('0x13'))));_0x4381d1[_0x6e70('0x14')](_0x6e70('0x15'),path[_0x6e70('0x10')](config[_0x6e70('0x11')],_0x6e70('0x12')));}if(_0x36357b==='development'||_0x36357b==='test'){_0x4381d1[_0x6e70('0xf')](favicon(path[_0x6e70('0x10')](config[_0x6e70('0x11')],_0x6e70('0x16'),_0x6e70('0x13'))));_0x4381d1[_0x6e70('0x14')](_0x6e70('0x15'),path[_0x6e70('0x10')](config['root'],'client'));_0x4381d1['use'](errorHandler());}_0x4381d1[_0x6e70('0x14')]('json\x20replacer',function(_0x53aed0,_0x304716){if(this[_0x53aed0]instanceof Date){_0x304716=this[_0x53aed0][_0x6e70('0x17')]()['split']('.')[0x0]+'Z';}return _0x304716;});_0x4381d1[_0x6e70('0xf')](express['static'](_0x4381d1[_0x6e70('0xc')](_0x6e70('0x15'))));_0x4381d1['set']('views',config[_0x6e70('0x11')]+'/server/views');_0x4381d1[_0x6e70('0x18')](_0x6e70('0x19'),require('ejs')['renderFile']);_0x4381d1[_0x6e70('0x14')](_0x6e70('0x1a'),_0x6e70('0x19'));_0x4381d1[_0x6e70('0xf')](bodyParser[_0x6e70('0x1b')]({'limit':_0x6e70('0x1c'),'extended':!![]}));_0x4381d1[_0x6e70('0xf')](bodyParser[_0x6e70('0x1d')]({'limit':_0x6e70('0x1c')}));_0x4381d1[_0x6e70('0xf')](cors());_0x4381d1['use'](methodOverride());_0x4381d1[_0x6e70('0xf')](cookieParser());_0x4381d1[_0x6e70('0xf')](passport[_0x6e70('0x1e')]());};