X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fconfig%2Fexpress.js;h=e6853c4e5bb5c70982b615329c78cae99c113bac;hb=784ff39bf52a5b7c5ee0b7b10d0e51f0257b5940;hp=a483d4253bf40bdf73621a1f3b64ba355acc6bd4;hpb=17b36376d3b7411763084143a03a7c6d2fc5e7b1;p=motion2.git diff --git a/server/config/express.js b/server/config/express.js index a483d42..e6853c4 100644 --- a/server/config/express.js +++ b/server/config/express.js @@ -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 _0x8353=['urlencoded','50mb','json','initialize','express','body-parser','method-override','cookie-parser','errorhandler','path','passport','moment','./environment','../mysqldb','get','env','set','appPath','join','root','public','development','test','use','json\x20replacer','toISOString','split','/server/views','engine','html','ejs'];(function(_0xca2aab,_0x57da5a){var _0x114790=function(_0x48b7de){while(--_0x48b7de){_0xca2aab['push'](_0xca2aab['shift']());}};_0x114790(++_0x57da5a);}(_0x8353,0xbe));var _0x3835=function(_0x465028,_0x4570ac){_0x465028=_0x465028-0x0;var _0xb783d4=_0x8353[_0x465028];return _0xb783d4;};'use strict';var express=require(_0x3835('0x0'));var favicon=require('serve-favicon');var bodyParser=require(_0x3835('0x1'));var methodOverride=require(_0x3835('0x2'));var cookieParser=require(_0x3835('0x3'));var errorHandler=require(_0x3835('0x4'));var path=require(_0x3835('0x5'));var passport=require(_0x3835('0x6'));var cors=require('cors');var moment=require(_0x3835('0x7'));var config=require(_0x3835('0x8'));var db=require(_0x3835('0x9'))['db'];exports['default']=function(_0x380684){var _0x26857d=_0x380684[_0x3835('0xa')](_0x3835('0xb'));if(_0x26857d==='production'){_0x380684[_0x3835('0xc')](_0x3835('0xd'),path[_0x3835('0xe')](config[_0x3835('0xf')],_0x3835('0x10')));}if(_0x26857d===_0x3835('0x11')||_0x26857d===_0x3835('0x12')){_0x380684['set'](_0x3835('0xd'),path['join'](config[_0x3835('0xf')],'client'));_0x380684[_0x3835('0x13')](errorHandler());}_0x380684['set'](_0x3835('0x14'),function(_0x44767b,_0x1e5e9c){if(this[_0x44767b]instanceof Date){_0x1e5e9c=this[_0x44767b][_0x3835('0x15')]()[_0x3835('0x16')]('.')[0x0]+'Z';}return _0x1e5e9c;});_0x380684[_0x3835('0x13')](express['static'](_0x380684[_0x3835('0xa')](_0x3835('0xd'))));_0x380684['set']('views',config[_0x3835('0xf')]+_0x3835('0x17'));_0x380684[_0x3835('0x18')](_0x3835('0x19'),require(_0x3835('0x1a'))['renderFile']);_0x380684['set']('view\x20engine',_0x3835('0x19'));_0x380684['use'](bodyParser[_0x3835('0x1b')]({'limit':_0x3835('0x1c'),'extended':!![]}));_0x380684[_0x3835('0x13')](bodyParser[_0x3835('0x1d')]({'limit':_0x3835('0x1c')}));_0x380684[_0x3835('0x13')](cors());_0x380684[_0x3835('0x13')](methodOverride());_0x380684[_0x3835('0x13')](cookieParser());_0x380684['use'](passport[_0x3835('0x1e')]());}; \ No newline at end of file