restart nodemon code example
Example 1: nodemon global instal npm
npm install -g nodemon
Example 2: nodemon package.json start
{
"name": "abc",
"version": "0.0.1",
"description": "my server",
"scripts": {
"start": "nodemon my_file.js" // <=
Example 3: nodemon is not restarting
npm install --save-dev nodemon@latest
Example 4: nodemon not restarting
process.once('SIGUSR2', function () {
gracefulShutdown(function () {
process.kill(process.pid, 'SIGUSR2');
});
});