node package manager

malt

Malt - Realtime Model Locator for Beanpole

Example:

 
var malt = require('malt'),
models = malt.models;
 
 
var ChatComment = models.Collection.extend({
    channel : '/chat/comments'
});
 
 
var cliqly = malt.connect('cliqly.spice.io', function()
{
    
    var comments = new ChatComment();
 
    //server is now pusing new comments 
    comments.sync({
        add: function(comment)
        {
            console.log(comment.message)
        } 
    });
    
});