Node Roundup: 0.10.17, Defining Global Scripts in npm, loadtest

2013-08-28 00:00:00 +0100 by Alex R. Young

Node 0.10.17

Node 0.10.17 is out, so it seems like we're back to weekly releases again. This version updates uv, tls, stream, dgram, and readline. The stream module fix makes errors raise exceptions when 'error' listeners are removed, which seems like a slight oversight to me...

Defining Global Scripts in npm

Joe Sullivan sent in his post about how global scripts are defined in popular npm modules. This is the kind of thing I like to see -- learning from the pros. Joe summarises the common approaches at the end of the post.


loadtest (GitHub: alexfernandez / loadtest, License: MIT, npm: loadtest) by Alex Fernández is a load testing module inspired by and partly compatible with Apache ab. It can be invoked as a command-line script or used as a module.

var loadtest = require('loadtest');
var options = {
    url: 'http://localhost:8000',
    maxRequests: 1000,

loadtest.loadTest(options, function(error, result) {
  if (error) {
    return console.error('Error:', error);

  console.log('Tests run successfully');

The callback is run when the requests have been made, or the specified number of seconds have elapsed.