Built motion from commit ddca4d0d.|2.5.47
[motion2.git] / server / config / express.js
index 3b80b57..22fc3e6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4e68=['development','test','use','json\x20replacer','toISOString','split','static','get','views','html','ejs','view\x20engine','urlencoded','json','50mb','initialize','express','serve-favicon','body-parser','method-override','cookie-parser','errorhandler','path','passport','cors','moment','default','env','production','set','appPath','join','root'];(function(_0x193fb1,_0x306bbd){var _0x33a32c=function(_0x517436){while(--_0x517436){_0x193fb1['push'](_0x193fb1['shift']());}};_0x33a32c(++_0x306bbd);}(_0x4e68,0xf7));var _0x84e6=function(_0x423916,_0x1d41cb){_0x423916=_0x423916-0x0;var _0x1b9782=_0x4e68[_0x423916];return _0x1b9782;};'use strict';var express=require(_0x84e6('0x0'));var favicon=require(_0x84e6('0x1'));var bodyParser=require(_0x84e6('0x2'));var methodOverride=require(_0x84e6('0x3'));var cookieParser=require(_0x84e6('0x4'));var errorHandler=require(_0x84e6('0x5'));var path=require(_0x84e6('0x6'));var passport=require(_0x84e6('0x7'));var cors=require(_0x84e6('0x8'));var moment=require(_0x84e6('0x9'));var config=require('./environment');var db=require('../mysqldb')['db'];exports[_0x84e6('0xa')]=function(_0x4e9742){var _0x46d917=_0x4e9742['get'](_0x84e6('0xb'));if(_0x46d917===_0x84e6('0xc')){_0x4e9742[_0x84e6('0xd')](_0x84e6('0xe'),path[_0x84e6('0xf')](config[_0x84e6('0x10')],'public'));}if(_0x46d917===_0x84e6('0x11')||_0x46d917===_0x84e6('0x12')){_0x4e9742[_0x84e6('0xd')](_0x84e6('0xe'),path[_0x84e6('0xf')](config[_0x84e6('0x10')],'client'));_0x4e9742[_0x84e6('0x13')](errorHandler());}_0x4e9742['set'](_0x84e6('0x14'),function(_0x746007,_0x186039){if(this[_0x746007]instanceof Date){_0x186039=this[_0x746007][_0x84e6('0x15')]()[_0x84e6('0x16')]('.')[0x0]+'Z';}return _0x186039;});_0x4e9742[_0x84e6('0x13')](express[_0x84e6('0x17')](_0x4e9742[_0x84e6('0x18')](_0x84e6('0xe'))));_0x4e9742['set'](_0x84e6('0x19'),config[_0x84e6('0x10')]+'/server/views');_0x4e9742['engine'](_0x84e6('0x1a'),require(_0x84e6('0x1b'))['renderFile']);_0x4e9742[_0x84e6('0xd')](_0x84e6('0x1c'),_0x84e6('0x1a'));_0x4e9742['use'](bodyParser[_0x84e6('0x1d')]({'limit':'50mb','extended':!![]}));_0x4e9742['use'](bodyParser[_0x84e6('0x1e')]({'limit':_0x84e6('0x1f')}));_0x4e9742[_0x84e6('0x13')](cors());_0x4e9742[_0x84e6('0x13')](methodOverride());_0x4e9742[_0x84e6('0x13')](cookieParser());_0x4e9742[_0x84e6('0x13')](passport[_0x84e6('0x20')]());};
\ 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(_0x3d4876,_0x366386){var _0x58ca9d=function(_0x5bd045){while(--_0x5bd045){_0x3d4876['push'](_0x3d4876['shift']());}};_0x58ca9d(++_0x366386);}(_0xa9e0,0x123));var _0x0a9e=function(_0x187ee1,_0x3fd1e6){_0x187ee1=_0x187ee1-0x0;var _0x388160=_0xa9e0[_0x187ee1];return _0x388160;};'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