likeastore/notifier — pull request #12 by gvilarino (2014-09-24 13:08:18+00:00)
Title: Db aliases

This PR makes `notifier` easier to integrate with existing, running applications by including support for name aliases on db collection names.

`notifier` assumes your DB will have a `user` collection with user data, but you may have a different schema.
Since `notifier` can't know your DB collection names beforehand, you can manually specify aliases for them. Just add an `aliases` object under the `db` object in your `config` files.

```js
db: {
connection: /*...your db connection string...*/,
aliases: {
user: "players",
}
}
```
This will make `db.user` actually end up using the `players` collection when querying the DB. You can do this for any `notifier`'s collections; check which those are in `source/db/index.js`.