Built motion from commit (unavailable).|2.4.4
[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 _0xa9e0=['50mb','express','serve-favicon','body-parser','errorhandler','passport','cors','moment','./environment','../mysqldb','get','use','public','favicon.ico','set','appPath','join','root','client','json\x20replacer','toISOString','views','/server/views','engine','html','ejs','renderFile','view\x20engine','urlencoded'];(function(_0x5aa373,_0x54c7f4){var _0x590e8e=function(_0x505e62){while(--_0x505e62){_0x5aa373['push'](_0x5aa373['shift']());}};_0x590e8e(++_0x54c7f4);}(_0xa9e0,0x123));var _0x0a9e=function(_0x30ae5e,_0x391fc4){_0x30ae5e=_0x30ae5e-0x0;var _0x1f2e93=_0xa9e0[_0x30ae5e];return _0x1f2e93;};'use strict';var express=require(_0x0a9e('0x0'));var favicon=require(_0x0a9e('0x1'));var bodyParser=require(_0x0a9e('0x2'));var methodOverride=require('method-override');var cookieParser=require('cookie-parser');var errorHandler=require(_0x0a9e('0x3'));var path=require('path');var passport=require(_0x0a9e('0x4'));var cors=require(_0x0a9e('0x5'));var moment=require(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var db=require(_0x0a9e('0x8'))['db'];exports['default']=function(_0x219af0){var _0x441e3a=_0x219af0[_0x0a9e('0x9')]('env');if(_0x441e3a==='production'){_0x219af0[_0x0a9e('0xa')](favicon(path['join'](config['root'],_0x0a9e('0xb'),_0x0a9e('0xc'))));_0x219af0[_0x0a9e('0xd')](_0x0a9e('0xe'),path[_0x0a9e('0xf')](config[_0x0a9e('0x10')],'public'));}if(_0x441e3a==='development'||_0x441e3a==='test'){_0x219af0['use'](favicon(path[_0x0a9e('0xf')](config[_0x0a9e('0x10')],_0x0a9e('0x11'),_0x0a9e('0xc'))));_0x219af0[_0x0a9e('0xd')](_0x0a9e('0xe'),path['join'](config[_0x0a9e('0x10')],_0x0a9e('0x11')));_0x219af0[_0x0a9e('0xa')](errorHandler());}_0x219af0[_0x0a9e('0xd')](_0x0a9e('0x12'),function(_0x4d5611,_0x52a03d){if(this[_0x4d5611]instanceof Date){_0x52a03d=this[_0x4d5611][_0x0a9e('0x13')]()['split']('.')[0x0]+'Z';}return _0x52a03d;});_0x219af0[_0x0a9e('0xa')](express['static'](_0x219af0[_0x0a9e('0x9')](_0x0a9e('0xe'))));_0x219af0['set'](_0x0a9e('0x14'),config['root']+_0x0a9e('0x15'));_0x219af0[_0x0a9e('0x16')](_0x0a9e('0x17'),require(_0x0a9e('0x18'))[_0x0a9e('0x19')]);_0x219af0[_0x0a9e('0xd')](_0x0a9e('0x1a'),_0x0a9e('0x17'));_0x219af0[_0x0a9e('0xa')](bodyParser[_0x0a9e('0x1b')]({'limit':_0x0a9e('0x1c'),'extended':!![]}));_0x219af0[_0x0a9e('0xa')](bodyParser['json']({'limit':_0x0a9e('0x1c')}));_0x219af0[_0x0a9e('0xa')](cors());_0x219af0['use'](methodOverride());_0x219af0[_0x0a9e('0xa')](cookieParser());_0x219af0['use'](passport['initialize']());};