Skip to content

Instantly share code, notes, and snippets.

@eddorre
Created April 20, 2011 23:32
Show Gist options
  • Save eddorre/933332 to your computer and use it in GitHub Desktop.
Save eddorre/933332 to your computer and use it in GitHub Desktop.
Mac OS X Snow Leopard
node version 0.5.0-pre
npm version 0.3.18
# mdns has been installed - npm install mdns (source: https://github.com/agnat/node_mdns)
var browser = mdns.createBrowser('http');
browser.on('serviceUp', function(info, flags) {
sys.puts("Up: " + sys.inspect(info));
});
browser.on('serviceDown', function(info, flags) {
sys.puts("Down: " + sys.inspect(info));
});
browser.start();
save as file.js
node file.js
# Node silently exits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment