stefanpenner/ember-cli — pull request #2504 by EndangeredMassa (2014-11-14 23:35:23+00:00)
Title: watch Brocfile.js and ./server for changes and restart local server

This uses [watch](https://github.com/mikeal/watch) to watch the `./server` directory (if it exists) for changes. It uses [fs.watchFile](http://nodejs.org/docs/latest/api/fs.html#fs_fs_watchfile_filename_options_listener) to watch the `Brocfile.js` file because the `watch` package can't watch just a single file. I found [fs.watch](http://nodejs.org/docs/latest/api/fs.html#fs_fs_watch_filename_options_listener) to not always work on my Ubuntu-based system.

On any change, it restarts the local server that's serving the app and handling the http-mocks and http-proxies. The result is very nice. I tested this with an actual app and was very pleased.

I'm more than happy to change how the file watching is happening. I'm happy to add a test for this, but I'm not sure how I would do that.

---

Implements https://github.com/stefanpenner/ember-cli/issues/2004