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