Created
December 18, 2015 07:52
-
-
Save bigbn/1ada7b06b4ece2890d1a to your computer and use it in GitHub Desktop.
Killing sails app on grunt error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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