grunt-express-angular-example icon indicating copy to clipboard operation
grunt-express-angular-example copied to clipboard

Express server blocking other watch tasks

Open jamescleary opened this issue 12 years ago • 4 comments

I cloned this repo, and am running grunt with the configurations provided. Whenever I try to make a change to files that are meant to be watched (in this case, app/styles/main.scss) the files do not update properly. I think the server process is blocking the watch processes for some reason. When I run grunt watch the static files update as expected.

jamescleary avatar Jul 20 '13 17:07 jamescleary

This could be caused by your particular configuration for express. And my guess is you have something similar to the following:

express: {
      options: {
        port: 9000,
        hostname: '*'
      },
      livereload: {
        options: {
          server: path.resolve('./server'),
          livereload: true,
          bases: [path.resolve('./.tmp'), path.resolve(__dirname, yeomanConfig.app)]
        }
      }
}

Meanwhile, try setting serverreload to true for your server (even if your intention is not to change anything on the server side), that would start the server in a child process and will not block any other tasks.

blai avatar Jul 21 '13 02:07 blai

have you tested the code on Mac? i have the same problem with the sample code downloaded .

nicolazj avatar Oct 11 '13 05:10 nicolazj

I have this issue as well, on OS X 10.9. Running grunt server does not update static assets when changed. Running grunt watch separately works fine (but there's still no live reloading).

jacksleight avatar Nov 18 '13 14:11 jacksleight

+1

ehynds avatar Dec 03 '13 15:12 ehynds