Meteor client side settings

meteor

Solution

If you're not doing any kind of initialization, i.e just storing values such as your api keys you can:

1) Have a `settings.json` file containing your settings in your project dir e.g

{ 
   "public" : {
       "api_key":"value1"
   }
}

Then start meteor with this settings file

meteor --settings settings.json

Access this value on your client via:

Meteor.settings.public.api_key
=> "value1"

Problem

Is there a good way to store client side settings for meteor that would be load before any other javascript? I would put things like api ids and other such into it.

Original source