diff --git a/start.js b/start.js index eb84627..58c7a46 100755 --- a/start.js +++ b/start.js @@ -13,7 +13,11 @@ const {reg} = require("./src/matrix/read-registration") const passthrough = require("./src/passthrough") const db = new sqlite("ooye.db") -const sync = new HeatSync({watchFunction: fs.watchFile}) +const sync = new HeatSync({ + watchFunction: (path, options, listener) => fs.watchFile(path, options, (curr, prev) => { + if (curr.mtimeMs !== prev.mtimeMs || curr.size !== prev.size) listener() + }) +}) Object.assign(passthrough, {sync, db})