-
Notifications
You must be signed in to change notification settings - Fork 308
Add a file watcher to re-start host when files change #45
Comments
@davidfowl We said to move this bug to here, but does it actually make sense? Can hosting actually do it? |
In case useful to anyone on Mac OS X ( as a temporary stop-gap ), I've created the following scripts which implement file system watching for the sample HelloMVC project, as listed below. This is used in conjunction w/ LiveReload for non-compiled file changes. To start the script, run ./watch.sh from the Terminal ( scripts copied to root of HelloMVC example ):
You may wish to sudo chmod +x watch.sh; sudo chmod +x auto-restart.sh before running. There is a slight pause / down-time incurred while the web server restarts itself. "brew install fswatch" was run to install fswatch. Additional code paths must be added to the "fswatch" line in watch.sh. Above scripts are not affiliated w/ ASP.NET vNext and aren't officially supported of course - Rather, thought they might be of interest to at least one individual. I'm sure a more elegant and streamlined solution is in the works. |
@glennc is this still a problem? I think we do restart the process when we pass in a |
I'm testing this on Windows and By looking at the code here, it doesn't restart. |
I am seeing the same on Windows and Mac. |
@davidfowl? I recall that this is intended. --watch looks for file changes and kills the process, but it relies on another process to monitor it and re-start it. IIS does this for us, and I think VS does also. |
If you're thinking of leaving it as-is, then the current setup will continue to be relatively substandard for those not using IIS compared to alternate technologies. In Node.js when using grunt / gulp, for example, FS watchers and automatic restarts of web servers are common place and super convenient. I recommend modernizing the toolchain for those who don't use IIS to support this and potentially offer a different switch / default behavior depending on settings and/or environment. |
I don't recall the discussion around having another process doing the restart for you - this is for sure not the case for cross plat. @lodejard @davidfowl any suggestions here? I'm leaning towards doing the restart here. |
Going back to aspnet/dnx#1795 as the primary discussion thread. |
So that we can edit a controller and refresh the browser to see changes.
The text was updated successfully, but these errors were encountered: