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