Built motion from commit e1760111.|2.6.18
[motion2.git] / server / config / express.js
index 41d1e31..ac35c55 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4853=['path','passport','cors','moment','./environment','../mysqldb','default','get','appPath','join','root','public','development','test','set','client','use','views','engine','ejs','renderFile','view\x20engine','html','urlencoded','50mb','json','body-parser','method-override','errorhandler'];(function(_0x5c619e,_0x1bccdf){var _0x445cf8=function(_0x2eaa64){while(--_0x2eaa64){_0x5c619e['push'](_0x5c619e['shift']());}};_0x445cf8(++_0x1bccdf);}(_0x4853,0x8e));var _0x3485=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x4853[_0x14add3];return _0x4a174f;};'use strict';var express=require('express');var favicon=require('serve-favicon');var bodyParser=require(_0x3485('0x0'));var methodOverride=require(_0x3485('0x1'));var cookieParser=require('cookie-parser');var errorHandler=require(_0x3485('0x2'));var path=require(_0x3485('0x3'));var passport=require(_0x3485('0x4'));var cors=require(_0x3485('0x5'));var moment=require(_0x3485('0x6'));var config=require(_0x3485('0x7'));var db=require(_0x3485('0x8'))['db'];exports[_0x3485('0x9')]=function(_0x45adf4){var _0x1b19db=_0x45adf4[_0x3485('0xa')]('env');if(_0x1b19db==='production'){_0x45adf4['set'](_0x3485('0xb'),path[_0x3485('0xc')](config[_0x3485('0xd')],_0x3485('0xe')));}if(_0x1b19db===_0x3485('0xf')||_0x1b19db===_0x3485('0x10')){_0x45adf4[_0x3485('0x11')](_0x3485('0xb'),path[_0x3485('0xc')](config[_0x3485('0xd')],_0x3485('0x12')));_0x45adf4['use'](errorHandler());}_0x45adf4[_0x3485('0x11')]('json\x20replacer',function(_0x26ebd8,_0x484007){if(this[_0x26ebd8]instanceof Date){_0x484007=this[_0x26ebd8]['toISOString']()['split']('.')[0x0]+'Z';}return _0x484007;});_0x45adf4[_0x3485('0x13')](express['static'](_0x45adf4[_0x3485('0xa')](_0x3485('0xb'))));_0x45adf4[_0x3485('0x11')](_0x3485('0x14'),config[_0x3485('0xd')]+'/server/views');_0x45adf4[_0x3485('0x15')]('html',require(_0x3485('0x16'))[_0x3485('0x17')]);_0x45adf4[_0x3485('0x11')](_0x3485('0x18'),_0x3485('0x19'));_0x45adf4[_0x3485('0x13')](bodyParser[_0x3485('0x1a')]({'limit':_0x3485('0x1b'),'extended':!![]}));_0x45adf4[_0x3485('0x13')](bodyParser[_0x3485('0x1c')]({'limit':_0x3485('0x1b')}));_0x45adf4[_0x3485('0x13')](cors());_0x45adf4[_0x3485('0x13')](methodOverride());_0x45adf4[_0x3485('0x13')](cookieParser());_0x45adf4[_0x3485('0x13')](passport['initialize']());};
\ No newline at end of file
+var _0xa9e0=['get','production','set','appPath','public','join','root','client','use','toISOString','split','static','views','/server/views','engine','html','ejs','urlencoded','50mb','json','initialize','express','method-override','cookie-parser','passport','./environment','default'];(function(_0x3504a0,_0x3f770f){var _0x3dfca3=function(_0x5adf34){while(--_0x5adf34){_0x3504a0['push'](_0x3504a0['shift']());}};_0x3dfca3(++_0x3f770f);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0xa9e0[_0x3947c9];return _0x2e7871;};'use strict';var express=require(_0x0a9e('0x0'));var methodOverride=require(_0x0a9e('0x1'));var cookieParser=require(_0x0a9e('0x2'));var errorHandler=require('errorhandler');var path=require('path');var passport=require(_0x0a9e('0x3'));var cors=require('cors');var config=require(_0x0a9e('0x4'));exports[_0x0a9e('0x5')]=function(_0x2ab90b){var _0x991246=_0x2ab90b[_0x0a9e('0x6')]('env');if(_0x991246===_0x0a9e('0x7')){_0x2ab90b[_0x0a9e('0x8')](_0x0a9e('0x9'),path['join'](config['root'],_0x0a9e('0xa')));}if(_0x991246==='development'||_0x991246==='test'){_0x2ab90b[_0x0a9e('0x8')](_0x0a9e('0x9'),path[_0x0a9e('0xb')](config[_0x0a9e('0xc')],_0x0a9e('0xd')));_0x2ab90b[_0x0a9e('0xe')](errorHandler());}_0x2ab90b['set']('json\x20replacer',function(_0x527cdd,_0x4cfe67){if(this[_0x527cdd]instanceof Date){_0x4cfe67=this[_0x527cdd][_0x0a9e('0xf')]()[_0x0a9e('0x10')]('.')[0x0]+'Z';}return _0x4cfe67;});_0x2ab90b[_0x0a9e('0xe')](express[_0x0a9e('0x11')](_0x2ab90b[_0x0a9e('0x6')](_0x0a9e('0x9'))));_0x2ab90b['set'](_0x0a9e('0x12'),config[_0x0a9e('0xc')]+_0x0a9e('0x13'));_0x2ab90b[_0x0a9e('0x14')](_0x0a9e('0x15'),require(_0x0a9e('0x16'))['renderFile']);_0x2ab90b[_0x0a9e('0x8')]('view\x20engine',_0x0a9e('0x15'));_0x2ab90b['use'](express[_0x0a9e('0x17')]({'limit':_0x0a9e('0x18'),'extended':!![]}));_0x2ab90b['use'](express[_0x0a9e('0x19')]({'limit':'50mb'}));_0x2ab90b[_0x0a9e('0xe')](cors());_0x2ab90b[_0x0a9e('0xe')](methodOverride());_0x2ab90b[_0x0a9e('0xe')](cookieParser());_0x2ab90b[_0x0a9e('0xe')](passport[_0x0a9e('0x1a')]());};
\ No newline at end of file