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

Change mongoose database dynamically #159

Open
gautamchitnis opened this issue Nov 29, 2018 · 1 comment
Open

Change mongoose database dynamically #159

gautamchitnis opened this issue Nov 29, 2018 · 1 comment

Comments

@gautamchitnis
Copy link

I'm trying to do something simple enough, but can't figure it out for the life of me.

I am trying to change the database before using RestHapi.create() call.

I have a config file which has the basic configuration setup and i need to change that dynamically for a certain functionality.

My config file creates a manifest, exactly like in appy-backend , another project by Author of this project.

I have tried using RestHapi.config.mongo.URI = "mongodb://localhost:27017/new_db_name"; but still it doesn't change the database.

I can provide any other details that might be needed to solve this.

Please help.

@JKHeadley
Copy link
Owner

Hi @gautamchitnis, would you mind sharing your code where you register the rest-hapi plugin?

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

No branches or pull requests

2 participants