DailyJS

Node Roundup: 0.10.37 and io.js 1.5.1, Node and Real-time Finance, comws

Alex R. Young

Subscribe

@dailyjs

Facebook

Google+

libraries node modules generators articles

Node Roundup: 0.10.37 and io.js 1.5.1, Node and Real-time Finance, comws

Posted by Alex R. Young on .
Featured

libraries node modules generators articles

Node Roundup: 0.10.37 and io.js 1.5.1, Node and Real-time Finance, comws

Posted by Alex R. Young on .

0.10.37 and io.js 1.5.1

Node 0.10.37 was released on Saturday. This updates uv, domains, buffer, console, v8, and http. The uv update fixes a security issue which allowed attackers to gain elevated privileges due to the way setuid and setgid were used.

io.js 1.5.1 also came out last week. The blog post has some useful community updates, including a talk by Tony Pujals about the future of io.js.

There's also an npm weekly post about fixes for npm shrinkwrap --dev, changes to shrinkwrap in npm 3, and a screencast by Ben Clinkinbeard about using npm link.

Node and Real-time Finance

Imre Fazekas sent in two articles about Node and real-time finance:

The first part covers the background and architecture of the project, and the second part goes into the build system. It sounds like the third part will expand on client/server code sharing, so presumably it'll feature some of the author's experiences with isomorphic templates and view models.

Comws

What if you like Koa's generator-based middleware but don't want to use Koa? Andrea Parodi has created Comws (GitHub: shes/comws, License: MIT, npm: comws), a library based on co that you can use with any Node application.

To use it, create an instance of CoMws and then add generators to the middleware stack:

var CoMws = require('comws');  
var mws = new CoMws();

mws.use(function *(next){  
  this.result += ' hello';
  yield next();
});

mws.use(function *(next){  
  this.result += ' world';
  yield next();
});

var ctx = { result: 'yet another' };

mws.run(ctx).then(function() {  
  //ctx.result === 'yet another hello world' 
});

If you're using Node 0.11.x or 0.12.x you'll need to run node with --harmony-generators or --harmony, but io.js should work without the flags.

I'd like to try this with Express, but it also seems like a useful module for non-web Node programs.