I have a self hosted ServiceStack application which I intend to use to develop an angular application with.
The problem is, previously, every time I\'ve made a change to
You need to set the AppHost
config to debug
mode:
SetConfig(new HostConfig {
DebugMode = true,
});
For performance reasons changes are only monitored for in Debug mode. See here for more information.
Automatic reload of modified views, layout templates and partials (in Debug mode)
The best way to avoid the Start-Up penalty is to avoid having to restart the AppDomain in the first place. So in Debug Mode we'll also do this where a background file system watcher monitors all pages, partials and Layout templates for modifications and recompiles and auto-reloads them on the fly, all-ready to deliever instant response time once the page is requested.
The issue is that he was changing the source file and not the output file. Since SS copies the files to /bin/debug
he needed to change that version.
Using HostConfig settings, we were able to to use the WebHostPhysicalPath
property in the following way during development, while setting up the SS Config:
SetConfig(new HostConfig {
#if DEBUG
DebugMode = true,
WebHostPhysicalPath = Path.GetFullPath(Path.Combine("~".MapServerPath(), "..", "..")),
#endif
});
This took us out of /bin/debug
and back to the source.