supervisor-hot-reload = supervisor + proxy-hot-reload.
$ npm i supervisor-hot-reload -g
app.js
'use strict';
const express = require('express');
const app = express();
const user = require('./user');
app.get('/', function (req, res) {
res.send(user);
})
app.listen(3000);
user.js
module.exports = {
id: 1,
age: 19
}
DEBUG=proxy-hot-reload supervisor-hot-reload app.js
If you modify user.js, it will hot reload user.js. If you change app.js, it will restart server.
see supervisor.
MIT