Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / config / express.js
index 8e26820..900f5b7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6fde=['./environment','../mysqldb','get','env','production','appPath','root','public','development','test','set','join','client','use','toISOString','split','views','/server/views','engine','html','ejs','renderFile','json','method-override','errorhandler','passport','moment'];(function(_0x1f06d6,_0x58b95f){var _0xa48fde=function(_0x302836){while(--_0x302836){_0x1f06d6['push'](_0x1f06d6['shift']());}};_0xa48fde(++_0x58b95f);}(_0x6fde,0xef));var _0xe6fd=function(_0x2fe3f2,_0x248d69){_0x2fe3f2=_0x2fe3f2-0x0;var _0x4180ac=_0x6fde[_0x2fe3f2];return _0x4180ac;};'use strict';var express=require('express');var favicon=require('serve-favicon');var bodyParser=require('body-parser');var methodOverride=require(_0xe6fd('0x0'));var cookieParser=require('cookie-parser');var errorHandler=require(_0xe6fd('0x1'));var path=require('path');var passport=require(_0xe6fd('0x2'));var cors=require('cors');var moment=require(_0xe6fd('0x3'));var config=require(_0xe6fd('0x4'));var db=require(_0xe6fd('0x5'))['db'];exports['default']=function(_0x425e22){var _0x2875cb=_0x425e22[_0xe6fd('0x6')](_0xe6fd('0x7'));if(_0x2875cb===_0xe6fd('0x8')){_0x425e22['set'](_0xe6fd('0x9'),path['join'](config[_0xe6fd('0xa')],_0xe6fd('0xb')));}if(_0x2875cb===_0xe6fd('0xc')||_0x2875cb===_0xe6fd('0xd')){_0x425e22[_0xe6fd('0xe')]('appPath',path[_0xe6fd('0xf')](config[_0xe6fd('0xa')],_0xe6fd('0x10')));_0x425e22[_0xe6fd('0x11')](errorHandler());}_0x425e22[_0xe6fd('0xe')]('json\x20replacer',function(_0x5e559b,_0x559322){if(this[_0x5e559b]instanceof Date){_0x559322=this[_0x5e559b][_0xe6fd('0x12')]()[_0xe6fd('0x13')]('.')[0x0]+'Z';}return _0x559322;});_0x425e22['use'](express['static'](_0x425e22['get']('appPath')));_0x425e22[_0xe6fd('0xe')](_0xe6fd('0x14'),config[_0xe6fd('0xa')]+_0xe6fd('0x15'));_0x425e22[_0xe6fd('0x16')](_0xe6fd('0x17'),require(_0xe6fd('0x18'))[_0xe6fd('0x19')]);_0x425e22[_0xe6fd('0xe')]('view\x20engine',_0xe6fd('0x17'));_0x425e22['use'](bodyParser['urlencoded']({'limit':'50mb','extended':!![]}));_0x425e22[_0xe6fd('0x11')](bodyParser[_0xe6fd('0x1a')]({'limit':'50mb'}));_0x425e22[_0xe6fd('0x11')](cors());_0x425e22[_0xe6fd('0x11')](methodOverride());_0x425e22[_0xe6fd('0x11')](cookieParser());_0x425e22['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(_0x14a862,_0x2b559d){var _0x245eb5=function(_0x6e014c){while(--_0x6e014c){_0x14a862['push'](_0x14a862['shift']());}};_0x245eb5(++_0x2b559d);}(_0xa9e0,0x123));var _0x0a9e=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0xa9e0[_0x6c993a];return _0x27f547;};'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