Skip to content

Instantly share code, notes, and snippets.

@bigbn
Created December 18, 2015 07:52
Show Gist options
  • Save bigbn/1ada7b06b4ece2890d1a to your computer and use it in GitHub Desktop.
Save bigbn/1ada7b06b4ece2890d1a to your computer and use it in GitHub Desktop.
Killing sails app on grunt error
module.exports.bootstrap = function(cb) {
sails.after('hook:grunt:error', function(error) {
sails.log.error('Grunt error! Lowering sails app...');
sails.lower(function() {
sails.log.error("Sails process stopped");
process.exit(1);
});
});
// It's very important to trigger this callback method when you are finished
// with the bootstrap! (otherwise your server will never lift, since it's waiting on the bootstrap)
cb();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment