我正在尝试在文件更改时重新加载浏览器,但我不知道如何
var changing = require('changing');
var watcher = changing(
{
interval: '0s'
});
watcher.add("/home/diegonode/Desktop/ExpressCart-master/routes/2.mk");
watcher.on('change', function (info)
{
var io = require('socket.io').listen(app.listen(7777));
io.sockets.emit('browserReload');
console.log("info");
console.error('An error occurred!');
});
请帮帮我