How to use the start function from pm2
Find comprehensive JavaScript pm2.start code examples handpicked from public code repositorys.
GitHub: ryanlelek/Raneto
36 37 38 39 40 41 42 43 44 45
program .command('start') .description('Start Raneto Service') .action(() => { pm2.connect(() => { pm2.start( { script: path.normalize(path.join(__dirname, '..', 'server.js')), exec_mode: 'fork', instances: 1,
449
0
0
GitHub: Taschendieb/autodeploy
56 57 58 59 60 61 62 63 64 65
if (err) { console.error(err); process.exit(1); } console.warn("Run pm2 startup to start AutoDeploy on reboot!") pm2.start(__dirname + '/../lib/server.js',{ "name": "AutoDeploy Server" }, function (err) { pm2.disconnect(); if (err) console.log("PM2 daemon is already running!" + err);
1
20
2
+ 9 other calls in file
10 11 12 13 14 15 16 17 18 19
} pm2.start({ script: 'index.js', name: 'worker', log: true, log_level: 'debug'
0
0
0
pm2.restart is the most popular function in pm2 (219 examples)