Skip to content

Instantly share code, notes, and snippets.

@gramos
Last active March 22, 2016 13:18
Show Gist options
  • Save gramos/c4bfdaef51b9c36c960d to your computer and use it in GitHub Desktop.
Save gramos/c4bfdaef51b9c36c960d to your computer and use it in GitHub Desktop.
const watch = require('fs').watch
watch('target.txt', function() {
console.log("File 'target.txt' just changed!");
});
console.log("Now watching target.txt for changes...");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment