codebuddies / cb-connect

Platform to connect mentors with mentees, accountability partners, and OS project maintainers with new contributors
GNU General Public License v3.0
14 stars 8 forks source link

Use dotenv for environment variables #32

Open angelocordon opened 5 years ago

angelocordon commented 5 years ago

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.

distalx commented 5 years ago

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

angelocordon commented 5 years ago

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 commented 5 years ago

Reopening in association to #81