Add watcher

parent 4e3d8462
......@@ -42,6 +42,18 @@ originNode.on('ready', () => {
localSecretKey: localWriteKey
})
secondWriter.on('error', (error) => {
console.log(error)
})
const watcher = secondWriter.watch('/', () => {
console.log('watcher change')
})
watcher.on('error', error => {
console.log('watcher error', error)
})
secondWriter.on('ready', () => {
console.log('second writer local', secondWriter.local)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment