How to use the stop function from pm2
Find comprehensive JavaScript pm2.stop code examples handpicked from public code repositorys.
GitHub: ryanlelek/Raneto
67 68 69 70 71 72 73 74 75 76
.command('stop') .description('Stop Raneto Service') .action(() => { pm2.connect(() => { // (error, proc) pm2.stop('raneto', (error) => { if (error) { console.log(`Raneto could not be stopped: ${error.msg}`); process.exit(1); }
449
0
0
GitHub: daxoneczek/bocik2
3 4 5 6 7 8 9 10 11 12
if (err) { console.error(err); process.exit(2); } pm2.stop('index.js', function(err) { pm2.disconnect(); // odłączamy się od pm2, gdy już nie jest nam potrzebne połączenie if (err) { console.error(err); process.exit(2);
0
0
0
pm2.restart is the most popular function in pm2 (219 examples)