Browse Source

shepherd pm2 api

ca333-dev
ca333 8 years ago
parent
commit
68d31e5e42
  1. 10
      routes/shepherd.js

10
routes/shepherd.js

@ -85,11 +85,11 @@ shepherd.post('/herdlist', function(req, res) {
//console.log(req.body.options); //console.log(req.body.options);
pm2.connect(true, function(err) { pm2.connect(true, function(err) {
pm2.describe('IGUANA', function(err, list){ if (err) throw err; //todo: proper error handling
console.log(list[0]); pm2.describe("IGUANA", function(err, list) {
for(var i = 0, l = list.length - 1; i < l; i++) { pm2.disconnect(); //disconnect after getting proc info list
console.log(list[i].pm2_env.status); if (err) throw err //todo: proper error handling
} console.log(list[0].pm2_env.status) //print status of IGUANA proc
}); });
}); });

Loading…
Cancel
Save