Why are my meteor settings not being passed to the application?

272 views Asked by At
set METEOR_SETTINGS={"public": {"stage": "development"}}
meteor

Then this line:

console.log(Meteor.settings.public.stage);

causes this error:

W20150612-20:45:38.338(-7)? (STDERR) TypeError: Cannot read property 'stage' of undefined

What am I doing wrong?

1

There are 1 answers

5
Christian Fritz On BEST ANSWER

From what I understand the environment variable is only for the deployment mode (running a bundle).

In development, i.e., when running meteor, you need to use the --settings command line parameter to specify a file containing the settings.