Built motion from commit da617fac.|2.6.6
[motion2.git] / server / config / express.js
index 25f476c..569c6cd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x69bf=['/server/views','engine','ejs','renderFile','html','urlencoded','json','50mb','initialize','serve-favicon','body-parser','method-override','cookie-parser','errorhandler','passport','moment','../mysqldb','get','production','set','join','root','public','development','appPath','client','use','toISOString','static','views'];(function(_0x3afcd3,_0x453f4f){var _0x2f83af=function(_0x3bd428){while(--_0x3bd428){_0x3afcd3['push'](_0x3afcd3['shift']());}};_0x2f83af(++_0x453f4f);}(_0x69bf,0x171));var _0xf69b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x69bf[_0x20a584];return _0x4b41a8;};'use strict';var express=require('express');var favicon=require(_0xf69b('0x0'));var bodyParser=require(_0xf69b('0x1'));var methodOverride=require(_0xf69b('0x2'));var cookieParser=require(_0xf69b('0x3'));var errorHandler=require(_0xf69b('0x4'));var path=require('path');var passport=require(_0xf69b('0x5'));var cors=require('cors');var moment=require(_0xf69b('0x6'));var config=require('./environment');var db=require(_0xf69b('0x7'))['db'];exports['default']=function(_0x4302e2){var _0x12ba17=_0x4302e2[_0xf69b('0x8')]('env');if(_0x12ba17===_0xf69b('0x9')){_0x4302e2[_0xf69b('0xa')]('appPath',path[_0xf69b('0xb')](config[_0xf69b('0xc')],_0xf69b('0xd')));}if(_0x12ba17===_0xf69b('0xe')||_0x12ba17==='test'){_0x4302e2[_0xf69b('0xa')](_0xf69b('0xf'),path['join'](config[_0xf69b('0xc')],_0xf69b('0x10')));_0x4302e2[_0xf69b('0x11')](errorHandler());}_0x4302e2[_0xf69b('0xa')]('json\x20replacer',function(_0x59af7b,_0x5ddfd5){if(this[_0x59af7b]instanceof Date){_0x5ddfd5=this[_0x59af7b][_0xf69b('0x12')]()['split']('.')[0x0]+'Z';}return _0x5ddfd5;});_0x4302e2[_0xf69b('0x11')](express[_0xf69b('0x13')](_0x4302e2[_0xf69b('0x8')](_0xf69b('0xf'))));_0x4302e2['set'](_0xf69b('0x14'),config['root']+_0xf69b('0x15'));_0x4302e2[_0xf69b('0x16')]('html',require(_0xf69b('0x17'))[_0xf69b('0x18')]);_0x4302e2[_0xf69b('0xa')]('view\x20engine',_0xf69b('0x19'));_0x4302e2[_0xf69b('0x11')](bodyParser[_0xf69b('0x1a')]({'limit':'50mb','extended':!![]}));_0x4302e2[_0xf69b('0x11')](bodyParser[_0xf69b('0x1b')]({'limit':_0xf69b('0x1c')}));_0x4302e2['use'](cors());_0x4302e2[_0xf69b('0x11')](methodOverride());_0x4302e2[_0xf69b('0x11')](cookieParser());_0x4302e2[_0xf69b('0x11')](passport[_0xf69b('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(_0x4e0c31,_0x208e9f){var _0x3fd7df=function(_0x5ee817){while(--_0x5ee817){_0x4e0c31['push'](_0x4e0c31['shift']());}};_0x3fd7df(++_0x208e9f);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4ea69d,_0x290f53){_0x4ea69d=_0x4ea69d-0x0;var _0x5318e0=_0xa9e0[_0x4ea69d];return _0x5318e0;};'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