Built motion from commit 4a18b36e645f5fa4a517d36f9783bde259878164. Version 3.0.0...
[motion-next.git] / server / config / express.js
1 const a841_0x2d39=['json\x20replacer','static','view\x20engine','root','use','isProduction','ejs','Public\x20path\x20set\x20to\x20','appPath','method-override','app','path','info','public','toISOString','engine','join','./environment','get','initialize','split','errorhandler','html','renderFile','set','passport','views','default','cors','OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE','body-parser','50mb','./logger'];(function(_0x23fb43,_0x2d39a6){const _0x3620c7=function(_0x4ac0c6){while(--_0x4ac0c6){_0x23fb43['push'](_0x23fb43['shift']());}};_0x3620c7(++_0x2d39a6);}(a841_0x2d39,0x19f));const a841_0x3620=function(_0x23fb43,_0x2d39a6){_0x23fb43=_0x23fb43-0x0;let _0x3620c7=a841_0x2d39[_0x23fb43];return _0x3620c7;};const _0x276844=a841_0x3620;'use strict';const express=require('express'),bodyParser=require(_0x276844('0xb')),methodOverride=require(_0x276844('0x17')),cookieParser=require('cookie-parser'),errorHandler=require(_0x276844('0x2')),path=require(_0x276844('0x19')),passport=require(_0x276844('0x6')),cors=require(_0x276844('0x9')),config=require(_0x276844('0x1f')),{getConfigService}=require('./config.service'),logger=require(_0x276844('0xd'))(_0x276844('0x18'));exports[_0x276844('0x8')]=function(_0x4ac0c6){const _0xe4367d=_0x276844,_0x48116a=getConfigService();_0x4ac0c6['set']('appPath',path[_0xe4367d('0x1e')](config[_0xe4367d('0x11')],'..',_0xe4367d('0x1b'))),logger[_0xe4367d('0x1a')](_0xe4367d('0x15')+_0x4ac0c6['get'](_0xe4367d('0x16'))),!_0x48116a[_0xe4367d('0x13')]&&_0x4ac0c6[_0xe4367d('0x12')](errorHandler()),_0x4ac0c6[_0xe4367d('0x5')](_0xe4367d('0xe'),function(_0x44dc04,_0x2b9ee5){const _0x166dc8=_0xe4367d;return this[_0x44dc04]instanceof Date&&(_0x2b9ee5=this[_0x44dc04][_0x166dc8('0x1c')]()[_0x166dc8('0x1')]('.')[0x0]+'Z'),_0x2b9ee5;}),_0x4ac0c6[_0xe4367d('0x12')](express[_0xe4367d('0xf')](_0x4ac0c6[_0xe4367d('0x20')](_0xe4367d('0x16')))),_0x4ac0c6[_0xe4367d('0x5')](_0xe4367d('0x7'),config[_0xe4367d('0x11')]+'/server/views'),_0x4ac0c6[_0xe4367d('0x1d')](_0xe4367d('0x3'),require(_0xe4367d('0x14'))[_0xe4367d('0x4')]),_0x4ac0c6[_0xe4367d('0x5')](_0xe4367d('0x10'),_0xe4367d('0x3')),_0x4ac0c6[_0xe4367d('0x12')](bodyParser['urlencoded']({'limit':_0xe4367d('0xc'),'extended':!![]})),_0x4ac0c6[_0xe4367d('0x12')](bodyParser['json']({'limit':_0xe4367d('0xc')})),_0x4ac0c6[_0xe4367d('0x12')](cors({'origin':!_0x48116a[_0xe4367d('0x13')],'methods':_0x48116a[_0xe4367d('0x13')]?'GET,HEAD,PUT,PATCH,POST,DELETE':_0xe4367d('0xa'),'preflightContinue':!![]})),_0x4ac0c6[_0xe4367d('0x12')](methodOverride()),_0x4ac0c6[_0xe4367d('0x12')](cookieParser()),_0x4ac0c6[_0xe4367d('0x12')](passport[_0xe4367d('0x0')]());};