lib/application.js
function(next) {
      self.loadAllExtensions(function() {
        // Add middleware to make html5mode work in angular.
        self.routers.page.use(function(request, response, next) {
          // If between JSON and HTML it prefers HTML, return index.html content since
          // we know its a direct browser request or another HTML consuming client.
          if (request.accepts(['json', 'html']) === 'html') {
            // Serve the right index.html taking into account overrides.
            return self.staticDiscover('index.html', function(indexFile) {
              response.status(200).sendFile(indexFile);
            });
          }
          next();
        });
        next();
      });
    }
function(next) {
      self.loadAllExtensions(function() {
        // Add middleware to make html5mode work in angular.
        self.routers.page.use(function(request, response, next) {
          // If between JSON and HTML it prefers HTML, return index.html content since
          // we know its a direct browser request or another HTML consuming client.
          if (request.accepts(['json', 'html']) === 'html') {
            // Serve the right index.html taking into account overrides.
            return self.staticDiscover('index.html', function(indexFile) {
              response.status(200).sendFile(indexFile);
            });
          }
          next();
        });
        next();
      });
    }
function ( next ) { self . loadAllExtensions ( function ( ) { // Add middleware to make html5mode work in angular. self . routers . page . use ( function ( request , response , next ) { // If between JSON and HTML it prefers HTML, return index.html content since // we know its a direct browser request or another HTML consuming client. if ( request . accepts ( [ 'json' , 'html' ] ) === 'html' ) { // Serve the right index.html taking into account overrides. return self . staticDiscover ( 'index.html' , function ( indexFile ) { response . status ( 200 ) . sendFile ( indexFile ) ; } ) ; } next ( ) ; } ) ; next ( ) ; } ) ; }
Load all extensions and call init hooks on all of them.
Load all extensions and call init hooks on all of them .