Browse Source

Merge pull request #598 from huangbong/master

Added app.js to spawn service scripts, PM2 compatibility
master
Matias Alejo Garcia 7 years ago
committed by GitHub
parent
commit
545dd4e51a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      app.js

23
app.js

@ -0,0 +1,23 @@
#!/usr/bin/env node
var spawn = require('child_process').spawn;
var async = require('async');
var scripts = ['locker/locker.js', 'messagebroker/messagebroker.js',
'bcmonitor/bcmonitor.js', 'emailservice/emailservice.js',
'pushnotificationsservice/pushnotificationsservice.js',
'fiatrateservice/fiatrateservice.js', 'bws.js'];
async.eachSeries(scripts, function(script, callback) {
console.log(`Spawning ${script}`);
var node = spawn('node', [script]);
node.stdout.on('data', (data) => {
console.log(`${data}`);
});
node.stderr.on('data', (data) => {
console.error(`${data}`);
});
callback();
});
Loading…
Cancel
Save