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