Skip to content

Instantly share code, notes, and snippets.

@amiel amiel/worker.js
Last active Aug 29, 2015

Embed
What would you like to do?
Loading sailsjs environment in a grunt task
module.exports = function (grunt) {
grunt.registerTask('queue:work', 'Run queue worker', function (command) {
var Sails = require('sails').Sails;
var callback = this.async();
var sails = new Sails();
var sailsConfig = { port: -1 };
sails.load(sailsConfig, function (err) {
sails.initialize(function(){
console.log("SAILS HAS LOADED");
callback();
});
});
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.