mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	formatting
This commit is contained in:
		
							parent
							
								
									b2e9f38965
								
							
						
					
					
						commit
						84852b98e9
					
				
							
								
								
									
										18
									
								
								app.js
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								app.js
									
									
									
									
									
								
							@ -12,28 +12,22 @@ module.exports = function(config) {
 | 
			
		||||
    var router = express.Router(); // eslint-disable-line
 | 
			
		||||
    var baseUriPath  = config.baseUriPath || '';
 | 
			
		||||
 | 
			
		||||
    app.use(favicon(__dirname + '/public/favicon.ico'));
 | 
			
		||||
 | 
			
		||||
    app.use(validator([]));
 | 
			
		||||
 | 
			
		||||
    app.set('trust proxy');
 | 
			
		||||
    app.set('port', config.port);
 | 
			
		||||
    app.locals.baseUriPath = baseUriPath;
 | 
			
		||||
    app.use(cookieParser());
 | 
			
		||||
 | 
			
		||||
    app.use(favicon(__dirname + '/public/favicon.ico'));
 | 
			
		||||
    app.use(validator([]));
 | 
			
		||||
    app.use(baseUriPath, express.static(__dirname + '/public'));
 | 
			
		||||
    app.use(bodyParser.json({ strict: false }));
 | 
			
		||||
    app.use(log4js.connectLogger(logger, {
 | 
			
		||||
        format: ':remote-addr :status :method :url :response-timems',
 | 
			
		||||
        level: 'auto' // 3XX=WARN, 4xx/5xx=ERROR
 | 
			
		||||
    }));
 | 
			
		||||
 | 
			
		||||
    app.set('port', config.port);
 | 
			
		||||
 | 
			
		||||
    app.use(baseUriPath, express.static(__dirname + '/public'));
 | 
			
		||||
    app.use(bodyParser.json({ strict: false }));
 | 
			
		||||
 | 
			
		||||
    app.use(cookieParser());
 | 
			
		||||
 | 
			
		||||
    // Setup API routes
 | 
			
		||||
    routes.create(router, config);
 | 
			
		||||
 | 
			
		||||
    app.use(baseUriPath, router);
 | 
			
		||||
 | 
			
		||||
    return app;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user