freeCodeCamp/pm2Start.js

13 lines
248 B
JavaScript
Raw Normal View History

var pm2 = require('pm2');
pm2.connect(function() {
pm2.start({
2015-06-18 21:33:34 +00:00
name: 'server',
script: 'server/server.js',
2015-06-29 17:10:22 +00:00
'exec_mode': 'cluster',
2015-06-18 21:33:34 +00:00
instances: '2',
2015-06-29 17:10:22 +00:00
'max_memory_restart': '900M'
}, function() {
pm2.disconnect();
});
});