title: What is the best way to configure angular cli build watch mode and nodemon watch?
body: <p>Hi I am developing a mean app using angular 4. I have used angular cli configuration. I want to auto build the code using watch mode and also want to restart the node server when any files changed.</p>
  
  <p>I used the following command but not working</p>
  
  <pre><code>script: {
     "server": "ng build -w &amp;&amp; nodemon --watch src/**/*.ts --exec ts-node ./bin/www"
  }
  </code></pre>
  
  <p>I have kept the configuration in the directory <code>bin/www</code> file which is importing <code>server.ts</code> from other place.</p>
  
  <p>The problem for above command is, ng cli is building the code with watch enabled but nodemon is not starting. </p>
  
  <p>So i tried the following. but its building only one time as watch is not enabled for cli. </p>
  
  <pre><code>script: {
     "server": "ng build &amp;&amp; nodemon --watch src/**/*.ts --exec ts-node ./bin/www"
  }
  </code></pre>
  
  <blockquote>
    <p>nodemon watch not working in either case.</p>
  </blockquote>