Can I have a package write to the `Meteor.settings`?

I have a variety of packages. They use specific variables.

packages/
   controller.es6
   camera.es6

When I include them, I want the to write to the Meteor.settings on my main application. Eg:

> Meteor.settings
{
  "controller": {
    "host": "1234",
    "port": "567"
  },
  "public": {
    "camera": {
      "aspectRatio": ['16', '9'],
      "height": 1920,
      "width": 1080,
      "default_output": "~/Pictures"
    }
  }
}

Is this possible?

Have you tried Meteor.settings.controller = {...}?

1 Like