Built motion from commit a679711e.|2.6.15
[motion2.git] / server / config / express.js
index 7534adf..8fb62fa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x78e7=['join','use','json\x20replacer','toISOString','static','views','html','renderFile','view\x20engine','urlencoded','50mb','initialize','express','body-parser','method-override','cookie-parser','errorhandler','passport','./environment','../mysqldb','default','get','production','set','appPath','development','test'];(function(_0x35b18a,_0x6b2fbe){var _0x4db1bd=function(_0x389e62){while(--_0x389e62){_0x35b18a['push'](_0x35b18a['shift']());}};_0x4db1bd(++_0x6b2fbe);}(_0x78e7,0x1f2));var _0x778e=function(_0x367e59,_0x41e538){_0x367e59=_0x367e59-0x0;var _0x18c626=_0x78e7[_0x367e59];return _0x18c626;};'use strict';var express=require(_0x778e('0x0'));var favicon=require('serve-favicon');var bodyParser=require(_0x778e('0x1'));var methodOverride=require(_0x778e('0x2'));var cookieParser=require(_0x778e('0x3'));var errorHandler=require(_0x778e('0x4'));var path=require('path');var passport=require(_0x778e('0x5'));var cors=require('cors');var moment=require('moment');var config=require(_0x778e('0x6'));var db=require(_0x778e('0x7'))['db'];exports[_0x778e('0x8')]=function(_0x5daf17){var _0x3a40e2=_0x5daf17[_0x778e('0x9')]('env');if(_0x3a40e2===_0x778e('0xa')){_0x5daf17[_0x778e('0xb')](_0x778e('0xc'),path['join'](config['root'],'public'));}if(_0x3a40e2===_0x778e('0xd')||_0x3a40e2===_0x778e('0xe')){_0x5daf17[_0x778e('0xb')](_0x778e('0xc'),path[_0x778e('0xf')](config['root'],'client'));_0x5daf17[_0x778e('0x10')](errorHandler());}_0x5daf17[_0x778e('0xb')](_0x778e('0x11'),function(_0x2fd116,_0x159109){if(this[_0x2fd116]instanceof Date){_0x159109=this[_0x2fd116][_0x778e('0x12')]()['split']('.')[0x0]+'Z';}return _0x159109;});_0x5daf17[_0x778e('0x10')](express[_0x778e('0x13')](_0x5daf17[_0x778e('0x9')](_0x778e('0xc'))));_0x5daf17['set'](_0x778e('0x14'),config['root']+'/server/views');_0x5daf17['engine'](_0x778e('0x15'),require('ejs')[_0x778e('0x16')]);_0x5daf17[_0x778e('0xb')](_0x778e('0x17'),_0x778e('0x15'));_0x5daf17[_0x778e('0x10')](bodyParser[_0x778e('0x18')]({'limit':_0x778e('0x19'),'extended':!![]}));_0x5daf17[_0x778e('0x10')](bodyParser['json']({'limit':'50mb'}));_0x5daf17[_0x778e('0x10')](cors());_0x5daf17[_0x778e('0x10')](methodOverride());_0x5daf17[_0x778e('0x10')](cookieParser());_0x5daf17[_0x778e('0x10')](passport[_0x778e('0x1a')]());};
\ 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(_0x16d411,_0x5e0970){var _0x20336d=function(_0x15d8aa){while(--_0x15d8aa){_0x16d411['push'](_0x16d411['shift']());}};_0x20336d(++_0x5e0970);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4fc9e6,_0xc51915){_0x4fc9e6=_0x4fc9e6-0x0;var _0x551d28=_0xa9e0[_0x4fc9e6];return _0x551d28;};'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