Where do I declare my ENV variables for things like mailgun, stripe payments, paypal, aws bucket etc. I am thinking that these need to be inside Meteor.startup or Meteor.settings? But does that keep them safe and out of the hands of anyone who would otherwise try to get those secret keys?
Is there any documentation or file inside the meteor app that has a list of ENV variables or settings that can be changed?
Thanks for the reply! I will have to look into that package.
Is it safe/secure to use Meteor.startup() and declare my ENV variables with process.env.VARIABLE = “”; until I get a chance to dive more into METEOR_SETTINGS?
For example, on the server the below code would be used to set my env variable for setting up a mail smtp. I was just wondering if this was secure enough to use for now.
“Normally” accessing ENV_VAR content is to understand as a READ functionality.
So you set your ENVIRONMENT values before starting the node process and get the values from system / server through process.env.varname.
It is also possible to set values by assigning them to process.env.newvar = value but this is only temporarily accessible in the nodejs context or if you run some child processes from your node process.
In case of the email package it is the only option to set the settings by MAIL_URL. So if you define it in your app, then you would probably need to save secrets in your app. That is why ENV_VAR on starting the process is the more advised way.
Im assuming that starter.sh is a script file that I run?
so inside the file I declare my METEOR_SETTINGS variable and meteor at the end of the file starts up the local server?
likewise for production the node fires the server. what is the main.js? But once deployed to my host, how would I run the starter.sh cause the website/app would already be running once deployed?
using a starter.sh file seems similar to creating a settings.json file and using the command