Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting values from a config file or environment variable in meteor

This would be very useful for storing API keys or other sensitive information. From what I understand, you can use config files locally but they won't work on meteor.com, but I heard a rumor that environment variables were soon to be supported, or are already as of a recent release, but I can't find any examples.

Can someone provide an example of how to retrieve a value from an environment variable or some other safe location?

like image 637
Samo Avatar asked Sep 26 '12 06:09

Samo


1 Answers

You can actually access the process object to retrieve environment variables in Meteor. In essence, just do the same as in this solution

like image 141
Aaron Avatar answered Oct 02 '22 19:10

Aaron