1

I'm sending email verifications for my meteor app but I'm also uploading the app to github. I have the following code:

if (Meteor.isServer) {
// This code only runs on the server
Meteor.startup(function () {
    // code to run on server at startup

    process.env.MAIL_URL = "smtp://" +
        encodeURIComponent("myUsernameIsHere") + ":" +
        encodeURIComponent("myPasswordIsHere") + '@' +
        encodeURIComponent("smtp.gmail.com") + ":" + 465;
    ..
    ..
    ..
}

Is there any way to make my username and password private in code so that it can't be viewed on my public github account?

Thanks

Barry Michael Doyle
  • 9,333
  • 30
  • 83
  • 143

1 Answers1

1

Yes, you just make an addition to your gitignore file. https://git-scm.com/docs/gitignore

It may be worthwhile for you to have a single file or directory with sensitive info for your whole app (keys, passwords) that you ignore.

thatgibbyguy
  • 4,033
  • 3
  • 23
  • 39