Node Roundup: Surviving npm Downtime, Waf Wall of Shame, stream-chat, Vein
Vein (License: MIT, npm: vein) is a WebSocket RPC module. It includes both client and server code, and a minimised build for browsers. RPC methods can be added using vein.add, and then called from clients:
// Server
vein.add('multiply', function(res, numOne, numTwo) {
res.reply(numOne * numTwo);
});
// Browser
var vein = Vein.createClient();
vein.on('ready', function(services) {
vein.multiply(2, 5, function(num) {
// num === 10
});
});
