Sails.js + PM2 - process.send is undefined -
i have sails.js app. using pm2 in production environment. according this issue, need send request sails
pm2
indicating app online.
module.exports.bootstrap = function(cb) { sails.on('lifted', function() { process.send('ready') // process.send undefined }); };
how trigger ready
event here?
please try:
var cp = require('child_process'); var p = cp.fork(__dirname + '/app'); sails.on('lifted', function() { p.send('ready'); });
however, use pm2 well, , launch production without code in bootstrap.js file , keymetrics works fine:
pm2 start app.js -x -- --prod
i hope helpful. cheers
Comments
Post a Comment