Node Roundup: watch-network, MailDev, node-notifier

2014-12-17 00:00:00 +0000 by Alex R. Young


If you use something like Docker or Vagrant and want to listen for file notifications over the network, then watch-network (GitHub: efacilitation/watch-network, License: MIT, npm: watch-network) by Johannes Becker might come in handy. It can be used with Gulp, so you could run Gulp tasks when a specific network notification comes in.

Here's a basic example:

var watch = WatchNetWork({
  configs: [{
    patterns: 'lib/*.coffee',
    tasks: 'something:important',
    onLoad: true

watch.task('something:important', function(changedFiles) {
  // ..


Here's the use-case that Johannes described:

Scenario: You use Vagrant/VirtualBox in your workflow to have services and configurations in an encapsulated environment. For developing purposes you now sync a local directory into the VM using vboxfs, nfs, rsync or similar. In your VM you want to use watcher facilities for developing-concerns, but for some reason triggering inotify over the network seems to be troublesome or unreliable.



If you've ever felt like handling emails in web applications is messy, and you don't feel like your emails are as good as they could be, then you're not alone! I always feel like emails are annoying to develop, so I thought MailDev (GitHub: djfarrelly/maildev, License: MIT, npm: maildev) looked interesting. This module helps you test your project's generated emails during development with a responsive web interface. It has a Node API, and there's even a REST API so you could integrate it with other services.

Emails are displayed with WebSockets, so you don't have to keep refreshing, and it'll show HTML, text, and attachments.

I currently send all the generated emails to a temporary directory, then open them up when I need to. MailDev seems like a much better solution.


Mikael Brevik sent in node-notifier (GitHub: mikaelbr/node-notifier, License: MIT, npm: node-notifier), in response to the recent mention of trayballoon. Node-notifier tries to smooth out the differences between each platform, so you can use notification features that are present on all platforms more easily. It also supports actions on notifications.

Mikael notes that it works with node-webkit, which is cool if you're making Node desktop apps, and it supports the following notification systems:

Here's an example:

var notifier = require('node-notifier');
  'title': 'My notification',
  'message': 'Hello, there!'