title: nodemon not applying changes automatically to the app
body: <p>When I save changes to the app nodemon says 'restarting due to changes'.
  But when I refresh my localhost it does not apply the changes.
  Everytime I have to run <code>nodemon app.js</code> to see the changes in my app. Why is it happening so?</p>
  <p>Below is the <strong>app.js</strong> code:</p>
  <pre><code>const express = require('express')
  
  // create express app
  const app = express();
  
  //register view engine
  app.set('view engine','ejs');
  
  //listen for requests
  app.listen(3000);
  
  app.use((req,res)=&gt;{
  
      console.log('new request made');
      console.log('Host:',req.hostname);
      console.log('Path:',req.path);
      console.log('Method:',req.method);
  
  });
  //multiple get request handlers for diff webpages
  app.get('/',(req,res)=&gt;{
  
      const blogs = [
          {title: 'Yoshi finds eggs', snippet: 'Lorem ipsum dolor sit amet consectetur'},
          {title: 'Mario finds stars', snippet: 'Lorem ipsum dolor sit amet consectetur'},
          {title: 'How to defeat bowser', snippet: 'Lorem ipsum dolor sit amet consectetur'},
        ];
  
      res.render('index',{title:'Home',blogs:blogs});  //the path for html webpage is always relative unless provided absolute. the root dir name of the path should be specified.
  });
  
  app.get('/about',(req,res)=&gt;{
      res.render('about',{title:'About'});
  
  });
  
  app.get('/blogs/create',(req,res)=&gt;{
      res.render('create',{title:'Create blog'});
  });
  
  app.get('/featured',(req,res)=&gt;{
  
      res.send('&lt;p&gt;Featured page&lt;/p&gt;');
  });
  
  //redirects 
  app.get('/about-us',(req,res)=&gt;{
      res.redirect('/about');          //express send this response to the browser and automatically set status code to 301.
  });
  
  //setup 404 page(this functionality always at last beacuse this displays 404 page when any of the above urls is not found)
  app.use((req,res) =&gt; {
      res.status(404).render('404',{title:'Error 404'});
  });
  
  </code></pre>
  <p><strong>package.json</strong> code:</p>
  <pre><code>{
    &quot;dependencies&quot;: {
      &quot;ejs&quot;: &quot;^3.1.6&quot;,
      &quot;express&quot;: &quot;^4.17.2&quot;
    }
  }
  
  </code></pre>
  <p>Versions:
  nodemon 2.0.15,
  node v16.13.2,
  npm 8.1.2</p>