【发布时间】:2015-11-07 19:34:31
【问题描述】:
我正在为我的流星应用程序发送电子邮件验证,但我也在将应用程序上传到 github。我有以下代码:
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;
..
..
..
}
有什么方法可以在代码中将我的用户名和密码设为私有,这样就无法在我的公共 github 帐户上查看?
谢谢
【问题讨论】:
标签: javascript meteor privacy env email-verification