blai / grunt-express-angular-example

Sample app that shows the usage of grunt-express v1.0
65 stars 30 forks source link

Express server blocking other watch tasks #1

Open jamescleary opened 11 years ago

jamescleary commented 11 years ago

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.

blai commented 11 years ago

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.

nicolazj commented 10 years ago

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

jacksleight commented 10 years ago

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).

ehynds commented 10 years ago

+1