Combine Yeoman Server and Node Supervisor

I'm using Yeoman to develop the frontend html app (backbone and bootstrap) and would like to use the same folder for backend development for the api (node, express, mongodb).

What I would like to do is to have the browser refreshed no matter what file was changed on frontend or backend.

What I'm doing now is:

  • For Yeoman I'm using the "yeoman server" that would refresh the browser every time I change something in the app folder.
  • I'm using the node supervisor module and executing the "supervisor server.js" for automatically kill the server and relaunch the node server if file is changed on the backend.

I'd like to avoid this as I need to run the yeoman and node server on different ports.

Is there a way to force autoreload of the browser with node supervisor or use the yeoman server as a classic node server?

You should be able to force the browser to reload with command grunt reload. Just childProcess.exec or childProcess.spawn the command.