Skip to content

Instantly share code, notes, and snippets.

View bigbn's full-sized avatar

Pavel Shabardin bigbn

View GitHub Profile
@bigbn
bigbn / bootstrap.js
Created December 18, 2015 07:52
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)