nodemon auto restart code example
Example 1: nodemon node
npm install -g nodemon
Example 2: nodemon not restarting
process.once('SIGUSR2', function () {
gracefulShutdown(function () {
process.kill(process.pid, 'SIGUSR2');
});
});
npm install -g nodemon
process.once('SIGUSR2', function () {
gracefulShutdown(function () {
process.kill(process.pid, 'SIGUSR2');
});
});