bootstrap.js 702 B

1234567891011121314151617181920
  1. /**
  2. * Bootstrap
  3. * (sails.config.bootstrap)
  4. *
  5. * An asynchronous bootstrap function that runs before your Sails app gets lifted.
  6. * This gives you an opportunity to set up your data model, run jobs, or perform some special logic.
  7. *
  8. * For more information on bootstrapping your app, check out:
  9. * http://sailsjs.org/#/documentation/reference/sails.config/sails.config.bootstrap.html
  10. */
  11. module.exports.bootstrap = function(cb) {
  12. sails.Sequelize = require('sequelize')
  13. sails.async = require('async')
  14. // It's very important to trigger this callback method when you are finished
  15. // with the bootstrap! (otherwise your server will never lift, since it's waiting on the bootstrap)
  16. cb();
  17. };