Meteor.settings from database

  1. Does exists any way to load Meteor.settings from mongo database? Does exists any package for this? I would like to change the settings without restart apache server and app.
  2. Is it good idea (from security way)?
  3. In case of NOT, is it right idea to create settings in mongo, create settings collection and work with settings as with a normal collection?

Thanks a lot for each answear.

  1. I’m not sure if there is any drop in solution for that
  2. If your settings are changing during runtime, this is a good way to store those settings on a collection. There isn’t any security problem about that. Caching such thing will be a good approach.
  3. I’m using both approach settings.json for development / production and collection for changing configuration.
1 Like

I would treat Meteor.settings as a fixed static property and create a separate settings collection for dynamic config that can change at runtime (as you suggest in 3)

1 Like

In our case, we separated the settings into 2.

Those that will not change much and are required to run the app e.g. api keys, we used the built-in meteor settings feature

For the rest that can be changed by an administrator of the application, we placed it on a collection that can be changed using a settings page e.g. no. of items displayed per page

1 Like

We did likewise. A new build and redeployment for each config change would be unacceptable.

1 Like