node-hot-require
features
- hot require one,reload all module required by it
- ignore all module in node_modules and system module
- custom filter function witch file will be reload or not
// app.jsconst express = ;const hot = ;// after version 1.0.6,filter witch file will be reloadhot {if filenamereturn false;return true;};const app = ;const router = hot;app;app;app;
// router.jsvar express = ;var router = express;router;moduleexports = router;
you will get change me!
edit router.js
change res.send('hello world')
open http://localhost:3000/upgrade to reload router.js
you will get hello world