Node Roundup: 0.6.14, Mocha 1.0, ncluster, ENVy
Node 0.6.14
Node 0.6.14 was released soon after 0.6.13. This release includes bug fixes and updates npm to 1.1.12.
Mocha 1.0
Mocha 1.0 has been released. There’s now a GitHub-flavoured Markdown reporter, and JavaScript “compilers” are now supported with mocha --compilers coffee:coffee-script.
An API has also been added, so it’s possible to programatically create tests:
var mocha = new Mocha;
mocha.reporter('spec').ui('bdd');
mocha.addFile('test/suite.js');
mocha.addFile('test/runner.js');
mocha.addFile('test/runnable.js');
ncluster
ncluster (npm: ncluster) by Ben Murphy is a zero-downtime clustering solution. It’ll reload the application when a SIGHUP is issued, and gracefully quit when SIGQUIT is sent.
Ben has designed it to be used with Capistrano. He’s also created a Node/Ubuntu Vagrant deployment solution with instructions for deploying his demo app to a virtual machine (nodejs_vagrant_helloworld).
ENVy
ENVy (npm: envy) by Elio Capella Sánchez is a small module for managing JSON settings files. It’ll use require to load a file called config.json in the project’s root directory.
It also uses a convention for automatically determining the environment and loading the appropriate properties. Given a JSON file like this:
{
"environment": "development",
"development": {
"test": "Development property"
},
"production": {
"test": "Production property"
}
}
Then require('envy').config will load the development settings, so config.test will return “Development property”.
