title: Nodemon does not restart when index.js file is changed
body: <p>This is the portion from <code>package.json</code> :</p>
  <pre><code>&quot;scripts&quot;: {
      &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;,
      &quot;start&quot;: &quot;node index.js&quot;,
      &quot;dev&quot;: &quot;nodemon --watch app index.js&quot;
    },
  </code></pre>
  <p>All my code except the <code>index.js</code>, <code>package.json</code> and <code>node_modules</code> resides in a sub folder called <code>app</code>.</p>
  <p>When I run using <code>npm run dev</code> , nodemon watches the changes in <code>app</code> folder and restarts if there's any changes. But won't restart if I make any changes in <code>index.js</code> (entry point)</p>
  <p>My folder structure:</p>
  <pre><code>|-- app/
  |-- node_modules/
  |index.js      &lt;--- nodemon not watching this file
  |package.json
  |package-lock.json
  </code></pre>
  <p>Why is it so?</p>
  <hr />
  <p><strong>EDIT:</strong></p>
  <p>Here's the solution (from @Pedro Filipe):</p>
  <pre><code>  &quot;scripts&quot;: {
      &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;,
      &quot;start&quot;: &quot;node index.js&quot;,
      &quot;dev&quot;: &quot;nodemon index.js&quot;
    },
  </code></pre>