Skip to content

Commit

Permalink
feat(gmail): add gmail address and app password to env
Browse files Browse the repository at this point in the history
  • Loading branch information
dargmuesli committed Feb 13, 2021
1 parent f7104de commit 6511855
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ module.exports = envalid.cleanEnv(process.env, {
default:
"DATABASE_URL=postgres://postgres:[email protected]:5432/postgres",
}),
GMAIL_ADDRESS: envalid.str({ default: "" }),
GMAIL_APP_PASSWORD: envalid.str({ default: "" }),
HOST: envalid.host({ default: "localhost" }),
SERVER_PORT: envalid.port({
default: 4000,
desc: "The port to start the server on",
}),
STRATEGY_TIMEFRAME: envalid.str({ default: "15m" }),
TRADER_PORT: envalid.port({
default: 8003,
desc: "The port to trader webserver runs",
}),
STRATEGY_TIMEFRAME: envalid.str({ default: "15m" }),
VERSION: envalid.str({ default: pjson.version }),
})
4 changes: 2 additions & 2 deletions src/trader.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const bva_key = env.BVA_API_KEY
//const telChanel = -12345678910 //Replace with your Chanel ID. Type /chanel in your telegram chanel
//const use_telegram = false //USE TELEGRAM ---- true = YES; false = NO
const send_email = false // USE SEND MAIL ---- true = YES; false = NO
const gmail_address = ""
const gmail_app_password = ""
const gmail_address = env.GMAIL_ADDRESS
const gmail_app_password = env.GMAIL_APP_PASSWORD
const gmailEmail = encodeURIComponent(gmail_address)
const gmailPassword = encodeURIComponent(gmail_app_password)
const mailTransport = nodemailer.createTransport(
Expand Down

0 comments on commit 6511855

Please sign in to comment.