0.0.0 • Published 11 years ago

mongoose-ratbird v0.0.0

Weekly downloads
2
License
LGPLv3
Repository
github
Last release
11 years ago

Mongoose Ratbird Preferences

Extend your Mongoose schemas with Ratbird notifier preferences.

Usage

Install with Node Package Manager:

npm install mongoose-ratbird

Invoke in you Mongoose schema:

var User = new mongoose.Schema({
  // ...
});

User.plugin(require('mongoose-ratbird'));

Now your mongoose Documents will have notification preferences that can be fed to the dispatch() method of an instance of ratbird.Notifier.

var notifier = ratbird.createNotifier(config);
// ...
notifier.dispatch({
  title: 'Some Notification',
  content: 'Something <em>really</em> important just happened!'
}, user._notifications);
0.0.0

11 years ago