You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
I'd like this repo to be able to use this to avoid having to restart node to get new server-side code loaded.
Now, I could implement my own module that is called via InvokeAsync's moduleName parameter. However, my application is using the that parameter for other purposes (MVC Areas if you must), and I would like the live-updating happening before there.
I basically need to change the way this tidbit works.
I am curious on your thoughts on this. I could do a couple things.
I could provide my own entry point script entirely with OutOfProcessNodeInstance, which I'd like to avoid because updates would break it.
Modify HttpNodeInstanceEntryPoint to accept a command line parameter that indicates a module name that should be used to invoke the moduleName parameter and exportedFunctionName. Basically, a small layer of indirection. When starting a node instance, we can then do node http-entry.js -requireModule hot-instance-require.js. This new hot-instance-require.js would look something like this.
// hot-instance-require.jsmodule.exports=function(moduleName,exportedFunctionName,callback){// custom module resolving and executing here that will executed the 'callback' parameter correctly}
I would of course do the work, but I wanted to discuss it with you before I do this. Would you accept a pull request providing this feature? If so, what approach would you like me to take?
NOTE: I understand the risks of reloading a previously require'd node module, but in my case, I am using a file generated from webpack. All the modules used in the script are bundled in the single javascript file.
Thanks for the suggestions. But could you clarify what aspect of the existing design isn't adequate for your requirements?
The .NET code already watches for changes to all files under a certain directory root that match a set of filename extensions that you can control. Is it not sufficient in your case to watch just one root directly, and does the set of path roots you want to watch change over time?
I'll close this since the conversation seems to have ended and it looks like we already have good support here, but please reopen with details if necessary.
Activity
pauldotknopf commentedon Jul 21, 2016
Actually, I am just now seeing that you have implemented auto restarting in the .NET side.
I think a better solution would be add support for updating watched paths, via:
Then, we can initialize a new
FileSystemWatcherthat will begin watching that file for changes.SteveSandersonMS commentedon Jul 26, 2016
Thanks for the suggestions. But could you clarify what aspect of the existing design isn't adequate for your requirements?
The .NET code already watches for changes to all files under a certain directory root that match a set of filename extensions that you can control. Is it not sufficient in your case to watch just one root directly, and does the set of path roots you want to watch change over time?
SteveSandersonMS commentedon Aug 4, 2016
I'll close this since the conversation seems to have ended and it looks like we already have good support here, but please reopen with details if necessary.