What?
If you need to reload only part of your app whithout restarting whole process when code require
d from this part was changed, then hot-module-reload
fit your needs.
Install
$ npm install hot-module-reload --save
How to use?
Pass function to hot-module-reload
, it will run it synchronously and then re-run it every time code require
d from this function is changed.
var HotReload = ; var devServer = {} ;; var appServer = { ; } ;;
In this example dev server and app server will be reloaded separately, and process will not crash if updated code doesn't compile.
License
MIT