api/hooks/load-db.js
/**
     * Method that runs automatically when the hook initializes itself.
     *
     * @param {Function}  next  Callback function to call after all is done
     */
Method that runs automatically when the hook initializes itself.
@param {Function}  next  Callback function to call after all is done
Method that runs automatically when the hook initializes itself . @param { Function } next Callback function to call after all is done
async function initialize() {
      var self = this;
      sails.after('hook:orm:loaded', async function onAfter() {
        await self.process();
      });
    }
async function initialize ( ) { var self = this ; sails . after ( 'hook:orm:loaded' , async function onAfter ( ) { await self . process ( ) ; } ) ; }
Method that runs automatically when the hook initializes itself.
Method that runs automatically when the hook initializes itself .
// Wait for sails orm hook to be loaded