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

Mongo Indexes #40

Open
sean-hill opened this issue Jun 26, 2016 · 3 comments
Open

Mongo Indexes #40

sean-hill opened this issue Jun 26, 2016 · 3 comments
Labels
faq convert to faq

Comments

@sean-hill
Copy link

Hey, I was curious what the best practice would be to setup indexes on my mongo DB database while using this plugin with my Seneca services. For example setting an index for an email address field for a user document. Each group (roles) of related services are in a separate project so I can deploy to different instances. Thanks!

@mnovosel2
Copy link

Any help with this?

@MikeLindenau
Copy link

MikeLindenau commented Aug 27, 2017

I set my indexes up in the plugin init action.

seneca.add({
  init: 'PluginName'
}, function(msg, done) {
  const entity = seneca.make();
  
  entity.native$(function (err, db) {
    db.ensureIndex(...);
  })
})

@rjrodger rjrodger added the faq convert to faq label May 25, 2021
@rjrodger
Copy link
Collaborator

Database configuration should be managed separately from Seneca via Kubernetes, Pulumi, Ansible, etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
faq convert to faq
Projects
None yet
Development

No branches or pull requests

4 participants