modella plugin for generating gravatars for node.js and browser.
In the browser (using component):
component install modella/gravatar
On the server:
npm install modella-gravatar
var User = model('user')
.attr('name')
.attr('email')
.attr('password');
User.use(gravatar('email', 'avatar'));
var user = new User({
name : 'matt',
email : '[email protected]',
password : 'test'
});
user.save(function(err) {
console.log(user.avatar());
});
MIT