Built motion from commit e1760111.|2.6.18
[motion2.git] / server / config / express.js
index 0d610a6..ac35c55 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3120=['path','passport','moment','./environment','get','env','set','appPath','join','public','development','test','root','json\x20replacer','toISOString','split','use','static','views','/server/views','engine','renderFile','view\x20engine','50mb','json','express','serve-favicon','body-parser','method-override','cookie-parser','errorhandler'];(function(_0x244314,_0x1f9217){var _0x539cf8=function(_0x22f932){while(--_0x22f932){_0x244314['push'](_0x244314['shift']());}};_0x539cf8(++_0x1f9217);}(_0x3120,0x130));var _0x0312=function(_0x209c42,_0x2cb43e){_0x209c42=_0x209c42-0x0;var _0x453efb=_0x3120[_0x209c42];return _0x453efb;};'use strict';var express=require(_0x0312('0x0'));var favicon=require(_0x0312('0x1'));var bodyParser=require(_0x0312('0x2'));var methodOverride=require(_0x0312('0x3'));var cookieParser=require(_0x0312('0x4'));var errorHandler=require(_0x0312('0x5'));var path=require(_0x0312('0x6'));var passport=require(_0x0312('0x7'));var cors=require('cors');var moment=require(_0x0312('0x8'));var config=require(_0x0312('0x9'));var db=require('../mysqldb')['db'];exports['default']=function(_0x3982fe){var _0xb4a9e0=_0x3982fe[_0x0312('0xa')](_0x0312('0xb'));if(_0xb4a9e0==='production'){_0x3982fe[_0x0312('0xc')](_0x0312('0xd'),path[_0x0312('0xe')](config['root'],_0x0312('0xf')));}if(_0xb4a9e0===_0x0312('0x10')||_0xb4a9e0===_0x0312('0x11')){_0x3982fe[_0x0312('0xc')](_0x0312('0xd'),path[_0x0312('0xe')](config[_0x0312('0x12')],'client'));_0x3982fe['use'](errorHandler());}_0x3982fe[_0x0312('0xc')](_0x0312('0x13'),function(_0x5a009d,_0x51e1a4){if(this[_0x5a009d]instanceof Date){_0x51e1a4=this[_0x5a009d][_0x0312('0x14')]()[_0x0312('0x15')]('.')[0x0]+'Z';}return _0x51e1a4;});_0x3982fe[_0x0312('0x16')](express[_0x0312('0x17')](_0x3982fe[_0x0312('0xa')](_0x0312('0xd'))));_0x3982fe['set'](_0x0312('0x18'),config[_0x0312('0x12')]+_0x0312('0x19'));_0x3982fe[_0x0312('0x1a')]('html',require('ejs')[_0x0312('0x1b')]);_0x3982fe[_0x0312('0xc')](_0x0312('0x1c'),'html');_0x3982fe[_0x0312('0x16')](bodyParser['urlencoded']({'limit':_0x0312('0x1d'),'extended':!![]}));_0x3982fe[_0x0312('0x16')](bodyParser[_0x0312('0x1e')]({'limit':_0x0312('0x1d')}));_0x3982fe[_0x0312('0x16')](cors());_0x3982fe[_0x0312('0x16')](methodOverride());_0x3982fe[_0x0312('0x16')](cookieParser());_0x3982fe['use'](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