Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Db aliases #11

Closed
wants to merge 32 commits into from
Closed

Conversation

gvilarino
Copy link

This PR makes it easy to integrate notifier with DBs with different schema names than the ones expected by notifier.

For instance, if instead of having your app users under a mongo collection named user you would have a hard time integrating notifier into it.

You can now specify aliases for collection names easily in your config files:

db: {
  connection: /*...*/,
  aliases: {
     user: "players"
  }
}

...

That would make all calls to db.user actually use the players colleciton in your DB.

The only change needed by this PR is that config files now have this db element and having connection inside of it. But the sample file modifications are also included here.

P.S.: I know there are a lot of changes in the PR but that's because I forked before the 0.1.0 release. It shouldn't affect anything.

@gvilarino
Copy link
Author

Actually, disregard this PR; it contains way too many changes, like support for jade templates and i18n.

I need to make these more organized and clear before commiting a PR

@gvilarino gvilarino closed this Sep 23, 2014
@alexbeletsky
Copy link
Member

Thx @gvilarino I will wait for smaller one :)

@gvilarino gvilarino deleted the db-aliases branch September 24, 2014 13:08
@gvilarino gvilarino restored the db-aliases branch September 24, 2014 13:08
@gvilarino
Copy link
Author

It's now available on #12 :)

@gvilarino gvilarino deleted the db-aliases branch December 12, 2014 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants