Skip to content

Commit

Permalink
demo: added missing env variables for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
dereekb committed Oct 9, 2022
1 parent aa1df57 commit 5ceec11
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ PUT_YOUR_REAL_SECRETS_INTO_ENV_SECRET=true
CLIENT_APP_URL=https://localhost:9910
STRIPE_SECRET=placeholder
STRIPE_WEBHOOK_SECRET=placeholder
MAILGUN_DOMAIN=placeholder
MAILGUN_API_KEY=placeholder
MAILGUN_SENDER_NAME=dbx-components server
MAILGUN_SENDER_EMAIL=postmaster@email.components.dereekb.com
10 changes: 8 additions & 2 deletions make-env.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* The expected usage is:
*
* node make-env.js
*
* Be sure to put all environment variables that have secrets that need to be deployed into the .env file, or declare them below.
*/
const fs = require('fs');
const { parse, stringify } = require('envfile');
Expand Down Expand Up @@ -34,9 +36,13 @@ function initWithProcessEnv(defaultValue, keysSource = env) {
// ======================================
// Configure Here using JS
// ======================================

const placeholderValue = 'plc';
initWithProcessEnv(placeholderValue); // Init with process.env, copying values from process.env onto the existing keys of our env variable

// Init with process.env, copying values from process.env onto the existing keys of our env variable
initWithProcessEnv(placeholderValue);

// Explicit Declaration
copyToEnvFromProcessEnv('MAILGUN_DOMAIN');

// ======================================
// Finish Configuration
Expand Down

0 comments on commit 5ceec11

Please sign in to comment.