Node Roundup: Uptime, mmmagic, nodeflix, opt

2012-05-23 00:00:00 +0100 by Alex R. Young
You can send in your Node projects for review through our contact form or @dailyjs.


Uptime screenshot

Uptime (GitHub: fzaninotto / uptime, License: MIT, npm: node-uptime) by Francois Zaninotto is an Express app for remote server monitoring. It's built with Mongoose, Bootstrap, ejs, Socket.IO, and jQuery.

To use the app, a YAML configuration file must be created for the sites you want to monitor. It seems like JSON would have been a more natural choice, but it's pretty easy to get started and there are examples in the documentation.

I'm always looking for open source Express applications, so keep them coming!


mmmagic (License: MIT, npm: mmmagic) by Brian White is a Node addon for libmagic, as used by the file command. It's asynchronous, and can provide the MIME type for a file (as well as other metadata):

var mmm = require('mmmagic')
  , Magic = mmm.Magic;

var magic = new Magic(mmm.MAGIC_MIME_TYPE);
magic.detectFile('/usr/bin/env', function(err, result) {
  if (err) throw err;

It's currently built with node-waf (rather than gyp), but the author has included a Windows binary.


Nodeflix (License: MIT, npm: nodeflix) by Johnathan Leppert is a Netflix API client:

n.get('/catalog/people', { term: 'DeNiro' }, function(data) {

I've noticed quite a few Node media-related modules cropping up, and with the continually improving Windows support it seems like Node is becoming a strong platform for home theatre-related application development. Is there a Node XBMC alternative yet?


opt (License: New BSD License, npm: opt) by R. S. Doiel is an options parser that can also load configuration files. It can generate usage based on the supplied parameters, but has a slightly different API to the other option parsing modules I've looked at -- callbacks are tied to each option instead of working with a parsed set of options:

#!/usr/bin/env node
var opt = require('opt')
  , args;

function test(param) {
  if (param) {
    console.log('--test parameter:', param);
  } else {
    console.log('No parameter supplied to --test');

opt.setup('Simple test script.');
opt.set(['-h', '--help'], opt.usage, 'Show help');
opt.set(['-t', '--test'], test, 'Run test');


This is quite different to how Commander.js works, for example.