cb-connect icon indicating copy to clipboard operation
cb-connect copied to clipboard

Use dotenv for environment variables

Open angelocordon opened this issue 5 years ago • 3 comments

I think it might be worth looking into using dotenv to manage environment variables, like Sparkpost's API key. This seems to be the most compatible/reliable one I've seen for Meteor - https://atmospherejs.com/pauldowman/dotenv

The main problem statement here is simply a small inconvenience for now but I think could help future contributors in the long run. Currently, in order to get the authentication emails, we have to replace he password value in line 14 of dev-settings.json and ignore this when committing.

https://github.com/codebuddies/cb-connect/blob/f8299e1c2320ccb0681f94bf62d37529badeddb0/dev-settings.json#L14

Ideally, each contributor can have their own set of environment keys that doesn't checked in with git. I think using environment variables to manage these for us should help users get up and running easier and allow for better productivity.

I believe it might also give us a simpler way of running local versions as you probably shouldn't need to append --settings dev-settings.json when starting up anymore.

Of course this is a tiny optimization for now, but can be helpful in the future. Posting this here for discussion as we're going to be aware of this when deploying to Heroku as well.

angelocordon avatar Mar 12 '19 06:03 angelocordon

Hi! @angelocordon

Ideally, each contributor can have their own set of environment keys that doesn't checked in with git. I think using environment variables to manage these for us should help users get up and running easier and allow for better productivity.

We already do have listed my-settings.json inside our .gitignore file for the same purpose. here

distalx avatar Mar 23 '19 18:03 distalx

Oh coo, thanks @distalx 👍 I think considering it was ignored in git, I didn't realize that something like that existed.

Anyways, going to close this question for now, definitely a pre-optimization.

angelocordon avatar Mar 25 '19 01:03 angelocordon

Reopening in association to #81

angelocordon avatar May 19 '19 04:05 angelocordon