I'm currently working on a package for Meteor that includes a build plugin. I need to access configurations from the settings file.
However Meteor.settings
doesn't work (Meteor is not defined
) and process.env.METEOR_SETTINGS
also doesn't exist.
Is there any way for my plugin to access the settings file?
It appears that despite the documentation discussing the use of --settings, it doesn't work in a production environment, as often command line options are not available.
So the solution is to use environment variables, which are available only on the server.
server code, meteor methods:
client code
So you can make those environment variables available on the client if you need them.