function ready__(cb) {
    return function(err) {
      if (err) {
        return cb && cb(err);
      }

      sails.log.silly('The router & all hooks were loaded successfully.');

      // If userconfig hook is turned off, still load globals.
      if (sails.config.hooks && sails.config.hooks.userconfig === false ||
           (sails.config.loadHooks && sails.config.loadHooks.indexOf('userconfig') === -1)) {
        sails.exposeGlobals();
      }

      // If the Sails environment is set to "production" but the Node environment isn't,
      // log a warning.
      if (sails.config.environment === 'production' && process.env.NODE_ENV !== 'production') {
        sails.log.warn('Detected Sails environment of `production`, but Node environment is `' + process.env.NODE_ENV + '`.\n' +
                       'It is recommended that in production mode, both the Sails and Node environments be set to `production`.');
      }

      cb && cb(null, sails);
    };
  }
Returns function which is fired when Sails is ready to go

@api private